开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜