From ac87ed7e9f0239b78459197cee3ddb1d2e77bc58 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 3 May 2015 12:59:09 -0400 Subject: update example, since python.org is HTTPS-only now (closes #24118) --- Doc/library/http.client.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst index 6324305..807f685 100644 --- a/Doc/library/http.client.rst +++ b/Doc/library/http.client.rst @@ -615,18 +615,18 @@ Examples Here is an example session that uses the ``GET`` method:: >>> import http.client - >>> conn = http.client.HTTPConnection("www.python.org") - >>> conn.request("GET", "/index.html") + >>> conn = http.client.HTTPSConnection("www.python.org") + >>> conn.request("GET", "/") >>> r1 = conn.getresponse() >>> print(r1.status, r1.reason) 200 OK >>> data1 = r1.read() # This will return entire content. >>> # The following example demonstrates reading data in chunks. - >>> conn.request("GET", "/index.html") + >>> conn.request("GET", "/") >>> r1 = conn.getresponse() >>> while not r1.closed: ... print(r1.read(200)) # 200 bytes - b'\n