summaryrefslogtreecommitdiff
path: root/requests/api.py
diff options
context:
space:
mode:
authorHans Lellelid <hans@xmpl.org>2012-12-20 09:44:43 -0500
committerHans Lellelid <hans@xmpl.org>2012-12-20 09:45:06 -0500
commitdd271782e82e7cabbf6a4ce5f26c9602780687d2 (patch)
tree4c6f2f5ab65458625f3f0ed75d7b5c7b55fe8db0 /requests/api.py
parent0769ee3b6dce489733dd34e54072395d9e92e4da (diff)
downloadpython-requests-dd271782e82e7cabbf6a4ce5f26c9602780687d2.tar.gz
Tweaked the 'data' param docs to indicate that a file-like object is also supported.
Diffstat (limited to 'requests/api.py')
-rw-r--r--requests/api.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/requests/api.py b/requests/api.py
index 294dbe4d..0efac8b8 100644
--- a/requests/api.py
+++ b/requests/api.py
@@ -21,7 +21,7 @@ def request(method, url, **kwargs):
:param method: method for the new :class:`Request` object.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
- :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
+ :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
:param files: (optional) Dictionary of 'name': file-like-objects (or {'name': ('filename', fileobj)}) for multipart encoding upload.
@@ -74,7 +74,7 @@ def post(url, data=None, **kwargs):
"""Sends a POST request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
- :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
+ :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
@@ -85,7 +85,7 @@ def put(url, data=None, **kwargs):
"""Sends a PUT request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
- :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
+ :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""
@@ -96,7 +96,7 @@ def patch(url, data=None, **kwargs):
"""Sends a PATCH request. Returns :class:`Response` object.
:param url: URL for the new :class:`Request` object.
- :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
+ :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
"""