From 28f34e7c1270bf9d9d648a65cd0d45c244c26d13 Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Tue, 30 Apr 2013 16:29:33 -0400 Subject: [PATCH] The 'method' parameter for httlib2 is not positional. Reviewed in https://codereview.appspot.com/8522043/. --- apiclient/http.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apiclient/http.py b/apiclient/http.py index a956477..b9cbfd7 100644 --- a/apiclient/http.py +++ b/apiclient/http.py @@ -738,7 +738,7 @@ class HttpRequest(object): start_headers['X-Upload-Content-Length'] = size start_headers['content-length'] = str(self.body_size) - resp, content = http.request(self.uri, self.method, + resp, content = http.request(self.uri, method=self.method, body=self.body, headers=start_headers) if resp.status == 200 and 'location' in resp: @@ -793,7 +793,7 @@ class HttpRequest(object): 'Content-Length': str(chunk_end - self.resumable_progress + 1) } try: - resp, content = http.request(self.resumable_uri, 'PUT', + resp, content = http.request(self.resumable_uri, method='PUT', body=data, headers=headers) except: @@ -1162,7 +1162,7 @@ class BatchHttpRequest(object): headers['content-type'] = ('multipart/mixed; ' 'boundary="%s"') % message.get_boundary() - resp, content = http.request(self._batch_uri, 'POST', body=body, + resp, content = http.request(self._batch_uri, method='POST', body=body, headers=headers) if resp.status >= 300: