summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-09-08 21:28:01 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2016-09-08 21:28:01 (GMT)
commit5dc504c3c937a160c6d09bb124df5298712a1839 (patch)
tree605050ae57b89646089c05f6affb707ebe24a5dc /Doc/library
parent37156a70b95b2e8efde26cc6c1b5ffd6830b664e (diff)
downloadcpython-5dc504c3c937a160c6d09bb124df5298712a1839.zip
cpython-5dc504c3c937a160c6d09bb124df5298712a1839.tar.gz
cpython-5dc504c3c937a160c6d09bb124df5298712a1839.tar.bz2
Issue28010 - Make http.client.HTTPConnection.putrequest documentation consistent with the code.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/http.client.rst24
1 files changed, 9 insertions, 15 deletions
diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst
index a9ca4b0..d863fe9 100644
--- a/Doc/library/http.client.rst
+++ b/Doc/library/http.client.rst
@@ -31,8 +31,7 @@ HTTPS protocols. It is normally not used directly --- the module
The module provides the following classes:
-.. class:: HTTPConnection(host, port=None[, timeout], \
- source_address=None)
+.. class:: HTTPConnection(host, port=None[, timeout], source_address=None)
An :class:`HTTPConnection` instance represents one transaction with an HTTP
server. It should be instantiated passing it a host and optional port
@@ -196,7 +195,6 @@ The constants defined in this module are:
The default port for the HTTP protocol (always ``80``).
-
.. data:: HTTPS_PORT
The default port for the HTTPS protocol (always ``443``).
@@ -318,14 +316,15 @@ As an alternative to using the :meth:`request` method described above, you can
also send your request step by step, by using the four functions below.
-.. method:: HTTPConnection.putrequest(request, selector, skip_host=False, skip_accept_encoding=False)
+.. method:: HTTPConnection.putrequest(method, url, skip_host=False, \
+ skip_accept_encoding=False)
- This should be the first call after the connection to the server has been made.
- It sends a line to the server consisting of the *request* string, the *selector*
- string, and the HTTP version (``HTTP/1.1``). To disable automatic sending of
- ``Host:`` or ``Accept-Encoding:`` headers (for example to accept additional
- content encodings), specify *skip_host* or *skip_accept_encoding* with non-False
- values.
+ This should be the first call after the connection to the server has been
+ made. It sends a line to the server consisting of the *method* string,
+ the *url* string, and the HTTP version (``HTTP/1.1``). To disable automatic
+ sending of ``Host:`` or ``Accept-Encoding:`` headers (for example to accept
+ additional content encodings), specify *skip_host* or *skip_accept_encoding*
+ with non-False values.
.. method:: HTTPConnection.putheader(header, argument[, ...])
@@ -384,7 +383,6 @@ statement.
return all of the values joined by ', '. If 'default' is any iterable other
than a single string, its elements are similarly returned joined by commas.
-
.. method:: HTTPResponse.getheaders()
Return a list of (header, value) tuples.
@@ -399,22 +397,18 @@ statement.
headers. :class:`http.client.HTTPMessage` is a subclass of
:class:`email.message.Message`.
-
.. attribute:: HTTPResponse.version
HTTP protocol version used by server. 10 for HTTP/1.0, 11 for HTTP/1.1.
-
.. attribute:: HTTPResponse.status
Status code returned by server.
-
.. attribute:: HTTPResponse.reason
Reason phrase returned by server.
-
.. attribute:: HTTPResponse.debuglevel
A debugging hook. If :attr:`debuglevel` is greater than zero, messages