Skip to content
Myr

Align Session.get parameters with requests.get (#7429)

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

authored by Nate Prewitt · committed by GitHub · parent a4f9a59 · Browse files · 1 file+9 added−2 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+9 added−2 removed

  • other:+9 added−2 removed

1 file+9 added−2 removed

modified:src/requests/sessions.py+9 added-2 removed
650 unmodified lines
651 resp = self.send(prep, **send_kwargs)652653 return resp654655 def get(self, url: _t.UriType, **kwargs: Unpack[_t.GetKwargs]) -> Response:655 def get(656 self,657 url: _t.UriType,658 params: _t.ParamsType = None,659 **kwargs: Unpack[_t.GetKwargs],660 ) -> Response:661 r"""Sends a GET request. Returns :class:`Response` object.662663 :param url: URL for the new :class:`Request` object.664 :param params: (optional) Dictionary, list of tuples or bytes to send665 in the query string for the :class:`Request`.666 :param \*\*kwargs: Optional arguments that ``request`` takes.667 :rtype: requests.Response668 """669670 kwargs.setdefault("allow_redirects", True)664 return self.request("GET", url, **kwargs)671 return self.request("GET", url, params=params, **kwargs)672673 def options(self, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:674 r"""Sends a OPTIONS request. Returns :class:`Response` object.675
245 unmodified lines