Skip to content

Commit

Permalink
Remove call to set default value for allow_redirects
Browse files Browse the repository at this point in the history
The call to kwargs.setdefault was redundant and unnecessary as the lower-level session defaults to true.
  • Loading branch information
laggardkernel committed Mar 19, 2021
1 parent 5433656 commit c267415
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions requests/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def get(url, params=None, **kwargs):
:rtype: requests.Response
"""

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


Expand All @@ -85,7 +84,6 @@ def options(url, **kwargs):
:rtype: requests.Response
"""

kwargs.setdefault('allow_redirects', True)
return request('options', url, **kwargs)


Expand Down

0 comments on commit c267415

Please sign in to comment.