[Tutor] upload xml file via pycurl
Rayon
evosweet at hotmail.com
Mon May 16 20:00:49 CEST 2011
I am trying to upload a xml file via pycurl, I really need some help here.
url = "https://192.168.0.68/fileupload/upload_file.php"
binaryptr = open('activation.xml','rb').read()
head = ['Content-type:text/xml']
c.setopt(c.SSL_VERIFYPEER, 0)
c.setopt(c.SSL_VERIFYHOST, 0)
c.setopt(c.POSTFIELDS,binaryptr)
c.setopt(c.POSTFIELDSIZE,23L)
c.setopt(c.HTTPHEADER,head)
c.setopt(c.URL, url)
c.setopt(c.VERBOSE, 1)
c.perform()
Regards Rayon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110516/5899a414/attachment.html>
More information about the Tutor
mailing list