is there an easy way of fetching the sent headers of an http request for pycurl/curl?
Right now I'm using a proxy where I can see the headers that are sent. I'm wondering if there's a simpler pyc开发者_StackOverflow中文版url method of grabbing the headers that were sent in an http request. Ive tried using HEADERFUNCTION already but it gives you the response headers and not the ones i'm looking for.
libcurl itself provides this data in the DEBUGFUNCTION callback, so if there's no current support for that in pycurl I figure it should be added and it shouldn't be too hard to do it...
There is indeed support for the debugfunction callback. Alternatively, if you just need the data for debugging purposes, set the verbose option to 1 on your Curl instance and the data will be sent to stdout.
精彩评论