update headers (token) on the fly #8
Replies: 1 comment
-
@Reapor-Yurnero This sounds like something you'd address at the HTTPX level, using Custom authentication flow. You can see an example of token renewal handling at the end of that docs section. If this doesn't fit your use case, and the service you're requesting requires doing some kind of token renewal while consuming the SSE stream, then I'm not sure I understand how that'd work and I'm happy to discuss more. E.g. You might be able to stop the SSE stream consumption (catch and pass some network exception? Or stop preventively after a bit less than 1 hour has passed since last renewal), retain the |
Beta Was this translation helpful? Give feedback.
-
Many authorization tokens expire after a certain period e.g. 1hr. To maintain the stream, the token needs to be updated. Is there anyway to do this on the fly with this package? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions