Error While Using Conn = Httplib.httpconnection ("http://ipaddr:port")
I am using httplib.HTTPConnection ('http://ipaddr:port') conn.request('GET', '', params, headers) I am able to do PUT/GET using ipaddr:port using my firefox client!!. But I am
Solution 1:
Try this instead (without "http://" before the IP address):
conn = httplib.HTTPConnection("x.x.x.x", port)
conn.request("GET", "", params, headers)
Solution 2:
You might have a proxy in between that the browser already knows about. If you're under linux try setting http_proxy
environment variable.
Solution 3:
If it's an IPv6 address, you need to surround it with brackets as per RFC 2732. If I recall correctly, that's the error message you get if you don't use brackets.
httplib.HTTPConnection ("http://[::1]:8080")
conn.request("GET", "", params, headers)
Post a Comment for "Error While Using Conn = Httplib.httpconnection ("http://ipaddr:port")"