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

PUT request fails with HTTP error 400 #202

Open
jamiebullock opened this issue Apr 3, 2018 · 0 comments
Open

PUT request fails with HTTP error 400 #202

jamiebullock opened this issue Apr 3, 2018 · 0 comments

Comments

@jamiebullock
Copy link

I have an authenticated session, which I can successfully make GET requests to the Basecamp API.

If I send a PUT request with:

r = session.put('https://3.basecampapi.com/.../mydoc.json', data='{"title":"blah","content":"test"}', params={'format': 'json'})
print r.json()

Then I receive:

{u'status': 400, u'error': u'Bad Request'}

I have tried also sending data={"title":"blah","content":"test"} but get the same error.

I am able to successfully PUT to the endpoint using CURL, e.g.

curl -s -H "Authorization: Bearer s9s9sd" -H "Content-Type: application/json" \
  -d '{"title":"blah","content":"test"}' -X PUT  https://3.basecampapi.com/...mydoc.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