Update documentation of the "data" parameter for requests.post() to indicate that...
authorRichard Boulton <richard@tartarus.org>
Thu, 16 Jun 2011 10:18:47 +0000 (03:18 -0700)
committerRichard Boulton <richard@tartarus.org>
Thu, 16 Jun 2011 10:18:47 +0000 (03:18 -0700)
requests/api.py

index 426cfaf..8967c26 100644 (file)
@@ -85,7 +85,7 @@ def post(url, data='', headers=None, files=None, cookies=None, auth=None, timeou
     """Sends a POST request. Returns :class:`Response` object.
 
     :param url: URL for the new :class:`Request` object.
-    :param data: (optional) Dictionary of POST data to send with the :class:`Request`.
+    :param data: (optional) Dictionary or bytes of POST data to send with the :class:`Request`.
     :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.
     :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.
     :param cookies: (optional) CookieJar object to send with the :class:`Request`.
@@ -102,8 +102,8 @@ def put(url, data='', headers=None, files=None, cookies=None, auth=None, timeout
     """Sends a PUT request. Returns :class:`Response` object.
 
     :param url: URL for the new :class:`Request` object.
-    :param params: (optional) Bytes of PUT Data to send with the :class:`Request`.
-    :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.
+    :param data: (optional) Bytes of PUT Data to send with the :class:`Request`.
+    :param headers: (optional) Dictionary or bytes of HTTP Headers to sent with the :class:`Request`.
     :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.
     :param cookies: (optional) CookieJar object to send with the :class:`Request`.
     :param auth: (optional) AuthObject to enable Basic HTTP Auth.