Change documentation comments for "params" and "data" parameters to refer to
Before adoption: this commit came in with the history the project adopted, so no landing records it.
the request body or the query string, as appropriate. "GET parameters", "POST data", etc aren't the ideal terminology to use - they come from common usage with web browsers, rather than the HTTP specification, so are off-putting in other contexts.
authored by Richard Boulton · committed by Richard Boulton · parent 023ab75 · Browse files · 1 file·+8 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+8 added−8 removed
- other:+8 added−8 removed
Provenance
- Commit
f31ade3- Tree
3445b56- Author
Richard Boulton <richard@tartarus.org>- Committer
Richard Boulton <richard@tartarus.org>- Parent
023ab75
1 file changed+8 added−8 removed
modified:requests/api.py+8 added-8 removed
22 unmodified lines23 """Constructs and sends a :class:`Request <models.Request>`. Returns :class:`Response <models.Response>` object.24 25 :param method: method for the new :class:`Request` object.26 :param url: URL for the new :class:`Request` object.27- :param params: (optional) Dictionary of GET/HEAD/DELETE Parameters to send with the :class:`Request`.28- :param data: (optional) Bytes/Dictionary of PUT/POST Data to send with the :class:`Request`.27+ :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.28+ :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.29 :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.30 :param cookies: (optional) CookieJar object to send with the :class:`Request`.31 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.32 :param auth: (optional) AuthObject to enable Basic HTTP Auth.23 unmodified lines56 def get(url, params=None, headers=None, cookies=None, auth=None, timeout=None):57 """Sends a GET request. Returns :class:`Response` object.58 59 :param url: URL for the new :class:`Request` object.60- :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.60+ :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.61 :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.62 :param cookies: (optional) CookieJar object to send with the :class:`Request`.63 :param auth: (optional) AuthObject to enable Basic HTTP Auth.64 :param timeout: (optional) Float describing the timeout of the request.5 unmodified lines70 def head(url, params=None, headers=None, cookies=None, auth=None, timeout=None):71 """Sends a HEAD request. Returns :class:`Response` object.72 73 :param url: URL for the new :class:`Request` object.74- :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.74+ :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.75 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.76 :param cookies: (optional) CookieJar object to send with the :class:`Request`.77 :param auth: (optional) AuthObject to enable Basic HTTP Auth.78 :param timeout: (optional) Float describing the timeout of the request.5 unmodified lines84 def post(url, data='', headers=None, files=None, cookies=None, auth=None, timeout=None, allow_redirects=False):85 """Sends a POST request. Returns :class:`Response` object.86 87 :param url: URL for the new :class:`Request` object.88- :param data: (optional) Dictionary or bytes of POST data to send with the :class:`Request`.88+ :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.89 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.90 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.91 :param cookies: (optional) CookieJar object to send with the :class:`Request`.92 :param auth: (optional) AuthObject to enable Basic HTTP Auth.8 unmodified lines101 def put(url, data='', headers=None, files=None, cookies=None, auth=None, timeout=None, allow_redirects=False):102 """Sends a PUT request. Returns :class:`Response` object.103 104 :param url: URL for the new :class:`Request` object.105- :param data: (optional) Bytes of PUT Data to send with the :class:`Request`.106- :param headers: (optional) Dictionary or bytes of HTTP Headers to sent with the :class:`Request`.105+ :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.106+ :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.107 :param files: (optional) Dictionary of 'filename': file-like-objects for multipart encoding upload.108 :param cookies: (optional) CookieJar object to send with the :class:`Request`.109 :param auth: (optional) AuthObject to enable Basic HTTP Auth.110 :param timeout: (optional) Float describing the timeout of the request.7 unmodified lines118 def delete(url, params=None, headers=None, cookies=None, auth=None, timeout=None, allow_redirects=False):119 """Sends a DELETE request. Returns :class:`Response` object.120 121 :param url: URL for the new :class:`Request` object.122- :param params: (optional) Dictionary of DELETE Parameters to send with the :class:`Request`.122+ :param params: (optional) Dictionary of parameters, or bytes, to be sent in the query string for the :class:`Request`.123 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.124 :param cookies: (optional) CookieJar object to send with the :class:`Request`.125 :param auth: (optional) AuthObject to enable Basic HTTP Auth.126 :param timeout: (optional) Float describing the timeout of the request.5 unmodified lines