Omit headers in requests POST request
14:37 18 May 2015

I am making a POST request using the import requests library. It's adding some headers to the request...

r = requests.post(url, headers = {"Content-Type" : "text/zinc; charset=utf-8"}, \
                  cookies = {"cookie":cookie}, \
                  data = data)

Here's the results of r.request.headers...

CaseInsensitiveDict({
    'Accept': '*/*',
    'Content-Type': 'text/zinc; charset=utf-8',
    'Accept-Encoding': 'gzip, deflate, compress',
    'User-Agent': 'python-requests/2.2.1 CPython/3.4.0 Linux/3.13.0-52-generic',
    'Cookie': 'cookie=mycookie; fanws="mycookie"'
})

How do I only include the headers that I specified?

python python-3.x python-requests