def curl(self, url, post):
try:<EOL><INDENT>req = urllib.request.Request(url)<EOL>req.add_header("<STR_LIT>", "<STR_LIT>")<EOL>data = urllib.request.urlopen(req, post.encode('<STR_LIT:utf-8>')).read()<EOL><DEDENT>except urllib.error.URLError as v:<EOL><INDENT>raise AmbientSMSError(v)<EOL><DEDENT>return dictFromXml(data)<EOL>
Inteface for sending web requests to the AmbientSMS API Server