How to properly use python requests post for sending data? or What's the best way to handle a python

16 Replies, 2012 Views

Wow, thanks everyone! Didn’t expect so many replies.

Update: I added the headers like @user1 suggested and it worked! Turns out the API needed auth *and* the content-type.

Still weird that it hung though—adding a timeout fixed that.

Follow-up Q: How do you handle timeouts in production? Just set it higher, or is there a smarter way?

Also, httpbin.org is a game-changer. Def using that next time.

PS: @user4, you’re a lifesaver with the `response.request.headers` trick. Never knew that existed!

Messages In This Thread



Users browsing this thread: 1 Guest(s)