Skip to content

Commit 6569837

Browse files
Update http.client.rst (GH-24803)
* Update http.client.rst * Apply suggestions from code review Co-authored-by: Éric <[email protected]> * Update http.client.rst Co-authored-by: Éric <[email protected]> Co-authored-by: Senthil Kumaran <[email protected]> (cherry picked from commit 0c91a12) Co-authored-by: Géry Ogam <[email protected]>
1 parent 280bf3f commit 6569837

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Doc/library/http.client.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The module provides the following classes:
5959

6060
.. versionchanged:: 3.4
6161
The *strict* parameter was removed. HTTP 0.9-style "Simple Responses" are
62-
not longer supported.
62+
no longer supported.
6363

6464
.. versionchanged:: 3.7
6565
*blocksize* parameter was added.
@@ -472,7 +472,7 @@ statement.
472472

473473
Return the value of the header *name*, or *default* if there is no header
474474
matching *name*. If there is more than one header with the name *name*,
475-
return all of the values joined by ', '. If 'default' is any iterable other
475+
return all of the values joined by ', '. If *default* is any iterable other
476476
than a single string, its elements are similarly returned joined by commas.
477477

478478
.. method:: HTTPResponse.getheaders()
@@ -576,7 +576,7 @@ Here is an example session that uses the ``HEAD`` method. Note that the
576576
>>> data == b''
577577
True
578578

579-
Here is an example session that shows how to ``POST`` requests::
579+
Here is an example session that uses the ``POST`` method::
580580

581581
>>> import http.client, urllib.parse
582582
>>> params = urllib.parse.urlencode({'@number': 12524, '@type': 'issue', '@action': 'show'})
@@ -592,14 +592,13 @@ Here is an example session that shows how to ``POST`` requests::
592592
b'Redirecting to <a href="https://bugs.python.org/issue12524">https://bugs.python.org/issue12524</a>'
593593
>>> conn.close()
594594

595-
Client side ``HTTP PUT`` requests are very similar to ``POST`` requests. The
596-
difference lies only the server side where HTTP server will allow resources to
597-
be created via ``PUT`` request. It should be noted that custom HTTP methods
595+
Client side HTTP ``PUT`` requests are very similar to ``POST`` requests. The
596+
difference lies only on the server side where HTTP servers will allow resources to
597+
be created via ``PUT`` requests. It should be noted that custom HTTP methods
598598
are also handled in :class:`urllib.request.Request` by setting the appropriate
599-
method attribute. Here is an example session that shows how to send a ``PUT``
600-
request using http.client::
599+
method attribute. Here is an example session that uses the ``PUT`` method::
601600

602-
>>> # This creates an HTTP message
601+
>>> # This creates an HTTP request
603602
>>> # with the content of BODY as the enclosed representation
604603
>>> # for the resource http://localhost:8080/file
605604
...

0 commit comments

Comments
 (0)