How can I view error messages with pycurl?
The response from the server is written using the curl option pycurl.WRITEFUNCTION
.
In your case, since you are passing it a StringIO
object, the response data should be in the foo
variable: foo.getvalue()
Reference: http://pycurl.sourceforge.net/doc/curlobject.html