Skip to content

Commit

Permalink
Merge pull request #427 from remko/master
Browse files Browse the repository at this point in the history
Don't pass 'files' through to token refresh
  • Loading branch information
JonathanHuot committed Feb 19, 2022
2 parents bc61703 + ea71577 commit 2113a70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requests_oauthlib/oauth2_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ def request(
withhold_token=False,
client_id=None,
client_secret=None,
files=None,
**kwargs
):
"""Intercept all requests and add the OAuth 2 token if present."""
Expand Down Expand Up @@ -533,7 +534,7 @@ def request(
log.debug("Supplying headers %s and data %s", headers, data)
log.debug("Passing through key word arguments %s.", kwargs)
return super(OAuth2Session, self).request(
method, url, headers=headers, data=data, **kwargs
method, url, headers=headers, data=data, files=files, **kwargs
)

def register_compliance_hook(self, hook_type, hook):
Expand Down

0 comments on commit 2113a70

Please sign in to comment.