Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我正在使用代理,我可以在其中看到发送的标头。我想知道是否有更简单的 pycurl 方法来获取在 http 请求中发送的标头。我已经尝试过使用 HEADERFUNCTION ,但它为您提供了响应标头,而不是我正在寻找的标头。
libcurl 本身在 DEBUGFUNCTION 回调中提供了这些数据,所以如果在 pycurl 中没有当前对它的支持,我认为应该添加它并且应该不会太难做到......
确实支持调试函数回调。或者,如果您只是出于调试目的需要数据,请在您的 Curl 实例上将详细选项设置为 1,然后数据将发送到标准输出。