Friday 27 September 2013

how to debug requests library?

how to debug requests library?

I'm trying to convert my python script from issuing a curl command via
os.system() to using requests. I thought I'd use pycurl, but this question
convinced me otherwise. The problem is I'm getting an error returned from
the server that I can see when using r.text (from this answer) but I need
more information. Is there a better way to debug what's happening?
for what it's worth I think the issue revoles around converting my --data
flag from curl/pycurl to requests. I've created a dictionary of the params
i was passing to --data before. My guess is that one of those isn't valid
but how can I get more info to know for sure?

No comments:

Post a Comment