Export to GitHub

httplib2 - issue #205

Support for proxy... (Python 3)


Posted on Mar 18, 2012 by Happy Ox

Using python 3 and SocksiPy library (socksipy-branch http://code.google.com/p/socksipy-branch/) (socksipy-branch is working with python 3)

but import httplib2 import socks

h = httplib2.Http(proxy_info = httplib2.ProxyInfo(socks.PROXY_TYPE_HTTP, ProxyHostname, ProxyPort)) r,c = h.request("http://automation.whatismyip.com/n09230945.asp")

gives no effect, while:

socks.setdefaultproxy(socks.PROXY_TYPE_HTTP, Hostname, Port) socks.wrapmodule(httplib2) h = httplib2.Http() r,c = h.request("http://automation.whatismyip.com/n09230945.asp")

does work :)

I would prefer the former and full support for proxies ;)

Status: New

Labels:
Type-Defect Priority-Medium