是否可以在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