Tag Archives: curl

#webdev #python curl #http post requests

webdev python curl http requests

simple python curl http post request example

import requests
url = 'https://www.example.com/'
data = {'requestXml': '<MYREQUESTXML>'}

r = requests.post(url, data)

print 'U '
print url
print 'S '
print r.status_code
print 'H '
print r.headers
print 'T '
print r.text