How to send XML through HTTP Request in Python?

jayfuzzy

New Member
\[code\]import urllib2request = urllib2.Request("URL HERE", data="http://stackoverflow.com/questions/10721127/<port>0</port>", headers={'Content-Type': 'application/xml'})u = urllib2.urlopen(request)response = u.read()\[/code\]I tried this but found out the XML is never getting to the server. I need the XML to get to the server at the same time the HTTP request does so the proper response is sent back.
 
Back
Top