From: Richard Boulton Date: Thu, 16 Jun 2011 10:18:47 +0000 (-0700) Subject: Update documentation of the "data" parameter for requests.post() to indicate that... X-Git-Tag: v0.6.0~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d1444b829f63582b0acb6aa53b82b2693c19213;p=services%2Fpython-requests.git Update documentation of the "data" parameter for requests.post() to indicate that it allows bytes. Update documentation of requests.put() to refer to the "data" parameter rather than the (hidden, but functional) "params" parameter, and note that that also allows both bytes and dictionaries. --- diff --git a/requests/api.py b/requests/api.py index 426cfaf..8967c26 100644 --- a/requests/api.py +++ b/requests/api.py @@ -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.