requests-oauthlib
requests-oauthlib copied to clipboard
Redo request after token is updated
https://github.com/requests/requests-oauthlib/blob/3a2a852e33c691c7e793300ce366a01b6e4b3848/requests_oauthlib/oauth2_session.py#L541
Seriously, why can't we just redo the request? That's what everybody's going to be doing anyway. Every project using this code is just going to write
result = None
while True:
try:
result = session.request(...)
except TokenUpdated:
pass