Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Doc/library/http.client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ HTTPConnection Objects
:class:`str` or bytes-like object that is not also a file as the
body representation.

.. note::

Note that you must have read the whole response or call :meth:`close`
if :meth:`getresponse` raised an non-:exc:`ConnectionError` exception
before you can send a new request to the server.

.. versionchanged:: 3.2
*body* can now be an iterable.

Expand All @@ -334,16 +340,15 @@ HTTPConnection Objects
Should be called after a request is sent to get the response from the server.
Returns an :class:`HTTPResponse` instance.

.. note::

Note that you must have read the whole response before you can send a new
request to the server.

.. versionchanged:: 3.5
If a :exc:`ConnectionError` or subclass is raised, the
:class:`HTTPConnection` object will be ready to reconnect when
a new request is sent.

Note that this does not apply to :exc:`OSError`\s raised by the underlying
socket. Instead the caller is responsible to call :meth:`close` on the
existing connection.


.. method:: HTTPConnection.set_debuglevel(level)

Expand Down
Loading