POST XML information using Python -


i creating program in python posts xml file website's rest api create vcs root (this website api documentation suggests). program creates xml file, based on user input, posts (using requests library), deletes file. there way can post information contained in xml file (mostly property values), without creating , deleting temporary xml file? can post information string or something? examples in python or curl help.

use data-attribute of requests:

from io import bytesio import xml.etree.elementtree et  data = et.element('some-xml') tree = et.elementtree(data) payload = bytesio() tree.write(payload) r = requests.post(url, data=payload.getvalue()) 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -