summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-11-12 10:32:47 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-11-12 10:32:47 (GMT)
commit040a927cd14e799454b246dd1f56fd7f4fdff03a (patch)
tree1d7e405492eecb89f90faf3751ee0368a81f2a56 /Doc
parent1ee79f16e859fd0a6ea3af64a539b5198b8ab7a3 (diff)
downloadcpython-040a927cd14e799454b246dd1f56fd7f4fdff03a.zip
cpython-040a927cd14e799454b246dd1f56fd7f4fdff03a.tar.gz
cpython-040a927cd14e799454b246dd1f56fd7f4fdff03a.tar.bz2
Patch #1065257: Support passing open files as body in
HTTPConnection.request().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libhttplib.tex5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/lib/libhttplib.tex b/Doc/lib/libhttplib.tex
index 049f6c4..557ee3d 100644
--- a/Doc/lib/libhttplib.tex
+++ b/Doc/lib/libhttplib.tex
@@ -304,9 +304,14 @@ Example: \code{httplib.responses[httplib.NOT_FOUND]} is \code{'Not Found'}.
This will send a request to the server using the HTTP request method
\var{method} and the selector \var{url}. If the \var{body} argument is
present, it should be a string of data to send after the headers are finished.
+Alternatively, it may be an open file object, in which case the
+contents of the file is sent; this file object should support
+\code{fileno()} and \code{read()} methods.
The header Content-Length is automatically set to the correct value.
The \var{headers} argument should be a mapping of extra HTTP headers to send
with the request.
+
+\versionchanged[\var{body} can be a file object]{2.6}
\end{methoddesc}
\begin{methoddesc}{getresponse}{}