RudySantana / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
0 stars 0 forks source link

Requests missing Accept header #181

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call the step2_exchange() method of the OAuth2WebServerFlow

Requests sent with HttpLib2 are missing an 'Accept' header to specify the type 
in which the server should send a response.

How to solve the issue:
Add a header 'Accept: application/json' to the httplib2.Http instance before 
calling the request() method.

I have attached a patch to solve it.

What version of the product are you using? On what operating system?
1.0c2

Please provide any additional information below.

Original issue reported on code.google.com by mohamed....@greendizer.com on 22 Aug 2012 at 7:31

Attachments:

GoogleCodeExporter commented 8 years ago
The code accepts both json and url encoded bodies.

http://code.google.com/p/google-api-python-client/source/browse/oauth2client/cli
ent.py#902

Original comment by jcgregorio@google.com on 23 Aug 2012 at 1:24