summaryrefslogtreecommitdiffstats
path: root/Doc/library/http.client.rst
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-12-19 10:49:52 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-12-19 10:49:52 (GMT)
commit7bc0d872ddb023333acc05b7d038cdb74cfc047b (patch)
tree6225e5ecb0546a7826743510555c604751b238c7 /Doc/library/http.client.rst
parent8a60e94802b04a838607b4aebba6fc8b70f7b87c (diff)
downloadcpython-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.rst12
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.