Search code examples
pythoncurlhttp-headerspycurl

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 pycurl 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.


Solution

  • 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...