Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct url getting 400 status #40

Open
chrisdrackett opened this issue Oct 12, 2012 · 0 comments
Open

correct url getting 400 status #40

chrisdrackett opened this issue Oct 12, 2012 · 0 comments

Comments

@chrisdrackett
Copy link

I'm actually not sure if this is an issue with requests or requests-oauth, but I'll post here first ;)

I'm creating a requests for which I get a 400 status returned from my API. The odd thing is, if I just print out the URL and paste it into my browser it works fine. My solution is to make another response, but it seems like there must be a bug somewhere :)

response = self.client.request(method, url, data=request_params, allow_redirects=True)
response.raise_for_status()
>> 400

response = self.client.request(method, url, data=request_params, allow_redirects=True)
response = requests.get(response.url)
response.raise_for_status()
print response
>> correct response json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant