diff options
author | Ashwin Ramaswami <aramaswamis@gmail.com> | 2019-09-13 11:40:08 (GMT) |
---|---|---|
committer | Stéphane Wirtel <stephane@wirtel.be> | 2019-09-13 11:40:07 (GMT) |
commit | ff2e18286560e981f4e09afb0d2448ea994414d8 (patch) | |
tree | 9a339486705cfbc5d6b183ffdf11ad686b256b1d /Doc/library/http.client.rst | |
parent | bb41147eab15a2958f4ad38261e5bf608f6ace1b (diff) | |
download | cpython-ff2e18286560e981f4e09afb0d2448ea994414d8.zip cpython-ff2e18286560e981f4e09afb0d2448ea994414d8.tar.gz cpython-ff2e18286560e981f4e09afb0d2448ea994414d8.tar.bz2 |
bpo-12707: deprecate info(), geturl(), getcode() methods in favor of headers, url, and status properties for HTTPResponse and addinfourl (GH-11447)
Co-Authored-By: epicfaace <aramaswamis@gmail.com>
Diffstat (limited to 'Doc/library/http.client.rst')
-rw-r--r-- | Doc/library/http.client.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst index db26d56..a458ab7 100644 --- a/Doc/library/http.client.rst +++ b/Doc/library/http.client.rst @@ -484,6 +484,14 @@ statement. HTTP protocol version used by server. 10 for HTTP/1.0, 11 for HTTP/1.1. +.. attribute:: HTTPResponse.url + + URL of the resource retrieved, commonly used to determine if a redirect was followed. + +.. attribute:: HTTPResponse.headers + + Headers of the response in the form of an :class:`email.message.EmailMessage` instance. + .. attribute:: HTTPResponse.status Status code returned by server. @@ -501,6 +509,21 @@ statement. Is ``True`` if the stream is closed. +.. method:: HTTPResponse.geturl() + + .. deprecated:: 3.9 + Deprecated in favor of :attr:`~HTTPResponse.url`. + +.. method:: HTTPResponse.info() + + .. deprecated:: 3.9 + Deprecated in favor of :attr:`~HTTPResponse.headers`. + +.. method:: HTTPResponse.getstatus() + + .. deprecated:: 3.9 + Deprecated in favor of :attr:`~HTTPResponse.status`. + Examples -------- |