diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-12-19 10:49:52 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-12-19 10:49:52 (GMT) |
commit | 7bc0d872ddb023333acc05b7d038cdb74cfc047b (patch) | |
tree | 6225e5ecb0546a7826743510555c604751b238c7 /Doc/library/http.client.rst | |
parent | 8a60e94802b04a838607b4aebba6fc8b70f7b87c (diff) | |
download | cpython-7bc0d872ddb023333acc05b7d038cdb74cfc047b.zip cpython-7bc0d872ddb023333acc05b7d038cdb74cfc047b.tar.gz cpython-7bc0d872ddb023333acc05b7d038cdb74cfc047b.tar.bz2 |
Issue3243 - Support iterable bodies in httplib. Patch contributions by Xuanji Li and Chris AtLee.
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. |