diff -r 66d0f6ef2a7f Doc/library/http.client.rst --- a/Doc/library/http.client.rst Thu Feb 28 18:03:16 2013 +0200 +++ b/Doc/library/http.client.rst Sat Mar 02 22:30:14 2013 -0500 @@ -457,6 +457,15 @@ The headers argument should be a mapping of extra HTTP headers to send with the CONNECT request. + For example, if we set up a HTTPS proxy server locally on port 8080. We first + set the tunnel host in `HTTPSConnection` and then the host we want to reach + into set_tunnel`:: + + >>> import http.client + >>> conn = http.client.HTTPSConnection("localhost",8080) + >>> conn.set_tunnel("www.python.org") + >>> conn.request("HEAD","/index.html") + .. versionadded:: 3.2