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.
我设置了一些额外的标题使用
c.setopt(self.c.HTTPHEADER, ['Accept: */*', ..., ...])
现在我想要的是在不破坏 pycurl 对象或关闭会话的情况下重置/清除该标题。
您可以重置标头,将其值设置为空白字符串
# 删除 2 个标题并保留其他标题 c.setopt(self.c.HTTPHEADER, ["User-Agent:","Accept:"])
您可以通过以下方式轻松做到这一点:
c.reset()