How to create a HTTP proxy handler with Python 3 HTTP lib
python, python-3.x
Solution
See the `httplib` python 3 documentation
import http.client
conn = http.client.HTTPSConnection("proxy_domain", 8080)
conn.set_tunnel("www.python.org")
conn.request("HEAD","/index.html")
Problem
I'm trying define a proxy handler to use http.client behind a proxy company. I know just how to use or define a proxy handler to urllib.: ``` http_proxy_full_auth_string = "http://"+"%s:%s@%s:%s" % (http_proxy_user, http_proxy_passwd, http_proxy_server, http_proxy_port) proxy_handler = urllib.request.ProxyHandler({"http": http_proxy_full_auth_string}) opener = urllib.request.build_opener(proxy_handler) urllib.request.install_opener(opener) resp = urllib.request.urlopen(uri).read() ``` And using http.client...? P.S: sorry for the low english skills...