- req = urllib2.Request(url, data)
- f = urllib2.urlopen(req)
- f.close()
-except Exception, e:
- print >> sys.stderr, "Problem while sending request via HTTP: %s: %s" % (url, e)
+ http = urllib3.PoolManager(cert_reqs="CERT_NONE")
+ http.request("POST",url, body=data)
+except Exception as e:
+ print("Problem while sending request via HTTP: %s: %s" % (url, e), file=sys.stderr)