how can i send an xml file on my system to an http server using python standard library??
import urllib
URL = "http://host.domain.tld/resource"
XML = "<xml />"
parameter = urllib.urlencode({'XML': XML})
a) using HTTP POST
response = urllib.urlopen(URL, parameter)
print response.read()
b) using HTTP GET
response = urllib.urlopen(URL + "?%s" % parameter)
print response.read()
That would be the simplest solution.
You can achieve that through a standard http post request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With