]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33830: Fix an example in http.client docs for 404. (GH-7780)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 21 Dec 2018 15:41:01 +0000 (07:41 -0800)
committerGitHub <noreply@github.com>
Fri, 21 Dec 2018 15:41:01 +0000 (07:41 -0800)
(cherry picked from commit f0af4c54e32d963e1ccbac005bcbcab1913e051f)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
Doc/library/http.client.rst

index c4b7c79730f49ab17246903d206d53ed07fcf40b..3408c103e2f328e06183fa2ed0666f3e1c7b768a 100644 (file)
@@ -497,6 +497,7 @@ Here is an example session that uses the ``GET`` method::
    b'<!doctype html>\n<!--[if"...
    ...
    >>> # Example of an invalid request
+   >>> conn = http.client.HTTPSConnection("docs.python.org")
    >>> conn.request("GET", "/parrot.spam")
    >>> r2 = conn.getresponse()
    >>> print(r2.status, r2.reason)