-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Being able to pause requests #92
Comments
I have created a PR for how I currently solved this issue. |
Really interesting FR (Feature Request). Is this request based on the need for having multiple requests but refresh token only once for all subsequent requests? |
This could be interesting as well if the "pausing" was performed when the retry policy is triggered instead of always as well, in any case, how would you feel about this? |
Hey, Maybe requests could be 'grouped' by a GUID, or adding tags to requests. With some way to cancel requests that belong to a certain group/tag. |
@CodingAleCR |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey @CodingAleCR please take a look on this issue. The bot seems not not like it and keeps closing xD |
Any developments on this feature? |
There's a PR outdated that deals with pooling requests and working on pauses. But other than that there's no current development at the moment. Feel free to drop a PR with an implementation if that's something you think could help 😉👌🏼 Thank you both for bringing this up as well! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is your feature request related to a problem? Please describe.
The app I'm building can fire multiple requests at once.
When one of the requests gets a 401 for an expired token, it updates the token in a
RetryPolicy
.During this update, all other requests should be paused as a new token is being retrieved.
Describe the solution you'd like
Be able to pause requests in the queue, and resume them. For example pausing the queue when a new token is being retrieved.
After the token is updated, all requests in the queue should have their
interceptRequest
method called, so the request can be updated with the new token (if an old token is in the request).An alternative would be that everything runs in a sequence, no simultaneous requests.
interceptRequest
RetryPolicy
+ pause all requests in the queueshouldAttemptRetryOnResponse
(token in storage updated)interceptRequest
interceptRequest
The text was updated successfully, but these errors were encountered: