Skip to content

Commit

Permalink
Merge pull request psf#2582 from mhavard999/master
Browse files Browse the repository at this point in the history
Make docstring of api.get more clear
  • Loading branch information
Lukasa committed May 1, 2015
2 parents ff71b25 + 6e9ebc0 commit 6acca21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions requests/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,18 @@ def request(method, url, **kwargs):
return response


def get(url, **kwargs):
def get(url, params=None, **kwargs):
"""Sends a GET request.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
"""

kwargs.setdefault('allow_redirects', True)
return request('get', url, **kwargs)
return request('get', url, params=params, **kwargs)


def options(url, **kwargs):
Expand Down

0 comments on commit 6acca21

Please sign in to comment.