将“ Content-Encoding”和“ Accept-Encoding”标头设置为“无”

时间:2019-02-19 11:05:39

标签: python http header python-requests

是否可以在python请求库中将“ Accept-Encoding”和“ Content-Encoding”标头设置为None?

我的标题是:

headers = {
    "Expect": "100-continue",
    "User-Agent": None,
    "Cookie": "Some cookies",
    "Accept": None,
    "Accept-Encoding": None,
    "Connection": None,
    "Content-Encoding": None
}

这是wireshark中的样子:

POST URL HTTP/1.1
Host: HOST
Accept-Encoding: identity
Cookie: Cookies
Expect: 100-continue
Content-Length: 0
Content-Encoding: deflate

它的外观如何:

POST URL HTTP/1.1
Content-Length: 0
Expect: 100-continue
Host: HOST
Cookie: Cookies

0 个答案:

没有答案