diff options
Diffstat (limited to 'Doc/library/http.client.rst')
-rw-r--r-- | Doc/library/http.client.rst | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst index 67d7271..cba5907 100644 --- a/Doc/library/http.client.rst +++ b/Doc/library/http.client.rst @@ -393,14 +393,18 @@ HTTPConnection Objects string. The *body* may also be an open :term:`file object`, in which case the - contents of the file is sent; this file object should support - ``fileno()`` and ``read()`` methods. The header Content-Length is - automatically set to the length of the file as reported by - stat. + contents of the file is sent; this file object should support ``fileno()`` + and ``read()`` methods. The header Content-Length is automatically set to + the length of the file as reported by stat. The *body* argument may also be + an iterable and Contet-Length header should be explicitly provided when the + body is an iterable. The *headers* argument should be a mapping of extra HTTP headers to send with the request. + .. versionadded:: 3.2 + *body* can be an iterable + .. method:: HTTPConnection.getresponse() Should be called after a request is sent to get the response from the server. |