Skip to content
Browse files

moar improvement i think (going back to old way with headers)

  • Loading branch information...
1 parent f23802c commit 7539dab281c26d9bd54653a50cd7e591ca223c6d @brosner brosner committed
Showing with 9 additions and 3 deletions.
  1. +9 −3 contacts_import/oauth_consumer.py
View
12 contacts_import/oauth_consumer.py
@@ -143,9 +143,15 @@ def _oauth_response(self, request):
http = httplib2.Http()
headers = {}
headers.update(request.to_header())
- ret = http.request(request.http_url, request.http_method,
- headers = headers,
- )
+ if request.http_method == "POST":
+ ret = http.request(request.http_url, "POST",
+ data = request.to_postdata(),
+ headers = headers,
+ )
+ else:
+ ret = http.request(request.to_url(), "GET",
+ headers = headers,
+ )
response, content = ret
logger.debug(repr(ret))
return content

0 comments on commit 7539dab

Please sign in to comment.
Something went wrong with that request. Please try again.