Cleaned up OAuth 2.0 support fully using Storage() and updating samples.
diff --git a/apiclient/http.py b/apiclient/http.py
index e9fd7e0..8f64baf 100644
--- a/apiclient/http.py
+++ b/apiclient/http.py
@@ -22,7 +22,10 @@
"""Encapsulates a single HTTP request.
"""
- def __init__(self, http, postproc, uri, method="GET", body=None, headers=None,
+ def __init__(self, http, postproc, uri,
+ method="GET",
+ body=None,
+ headers=None,
methodId=None):
"""Constructor for an HttpRequest.
@@ -150,6 +153,7 @@
model = JsonModel()
return HttpRequestMock(None, '{}', model.response)
+
class HttpMock(object):
"""Mock of httplib2.Http"""
@@ -164,5 +168,10 @@
f.close()
self.headers = headers
- def request(self, uri, method="GET", body=None, headers=None, redirections=1, connection_type=None):
+ def request(self, uri,
+ method="GET",
+ body=None,
+ headers=None,
+ redirections=1,
+ connection_type=None):
return httplib2.Response(self.headers), self.data