<div>Using the following code I am trying to pass a header to my POST request. (Note: urls masked)</div>
<div> </div>
<div>file = sys.argv[0]<br>url = sys.argv[1]</div>
<div>conn = httplib.HTTPConnection("XX.XXX.XX.XXX",XXXX)<br>headers = {'content-type':'application/xml'}<br>conn.request("POST",url,file,headers)<br>response = conn.getresponse()<br>head = response.getheaders()<br>
status = response.status<br>response = response.read()<br>print response, status, head<br></div>
<div> </div>
<div>When I run this script and view the headers that get printed the following displays:</div>
<div> </div>
<div>[('content-length', '691'), ('proxy-connection', 'Keep-Alive'), ('connection', 'Keep-Alive'), ('pragma', 'no-cache'), ('cache-control', 'no-cache'), ('content-type', 'text/html; charset=utf-8')]<br>
</div>
<div>Why isn't my content-type header using the value I pass in from headers?</div>