Skip to content
Myr

Document that 'params' can also be a list of tuples

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Like we just did for 'data', 'params' follows the same processing and can also be a list of tuples.

authored by Matthieu Moy · committed by Matthieu Moy · parent 2d1b448 · Browse files · 2 files+7 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−3 removed

  • other:+7 added−3 removed

2 files+7 added−3 removed

modified:requests/api.py+4 added-2 removed
16 unmodified lines
17 """Constructs and sends a :class:`Request <Request>`.1819 :param method: method for the new :class:`Request` object.20 :param url: URL for the new :class:`Request` object.21 :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.21 :param params: (optional) Dictionary, list of tuples or bytes to send22 in the body of the :class:`Request`.23 :param data: (optional) Dictionary, list of tuples, bytes, or file-like24 object to send in the body of the :class:`Request`.25 :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.26 :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
36 unmodified lines
63def get(url, params=None, **kwargs):64 r"""Sends a GET request.6566 :param url: URL for the new :class:`Request` object.66 :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.67 :param params: (optional) Dictionary, list of tuples or bytes to send68 in the body of the :class:`Request`.69 :param \*\*kwargs: Optional arguments that ``request`` takes.70 :return: :class:`Response <Response>` object71 :rtype: requests.Response72 """
86 unmodified lines
modified:requests/models.py+3 added-1 removed
206 unmodified lines
207 :param data: the body to attach to the request. If a dictionary or208 list of tuples ``[(key, value)]`` is provided, form-encoding will209 take place.210 :param json: json for the body to attach to the request (if files or data is not specified).211 :param params: dictionary of URL parameters to append to the URL.211 :param params: URL parameters to append to the URL. If a dictionary or212 list of tuples ``[(key, value)]`` is provided, form-encoding will213 take place.214 :param auth: Auth handler or (user, pass) tuple.215 :param cookies: dictionary or CookieJar of cookies to attach to this request.216 :param hooks: dictionary of callback hooks, for internal usage.217
739 unmodified lines