Created
June 2, 2015 19:21
-
-
Save Calzzetta/8ddeffc81931d22ef716 to your computer and use it in GitHub Desktop.
POST SOAP using urllib2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
REQUEST_URL = 'url do server' | |
HEADERS = {'content-type':'text/x-xml'} | |
def post_soap(msg): | |
req = urllib2.Request(REQUEST_URL, msg, HEADERS) | |
r = urllib2.urlopen(req) | |
returned_line = ''.join(r.readlines()) | |
return returned_line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment