Is there any way to control the sequence of http responses with Dio #1396
Unanswered
GadepalliAditya1998
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have a use case where I want to make multiple http requests at once using Future.wait([requests]) of order some 1, 2, 3..
My dio client has a Interceptor that is intercepting all the requests
Can I make dio to get the responses and errors callbacks to be executed in the same order? so that if any of the request fails, I will cancel the other http requests made treating as entire requests failure and do something I want
My use case is for JWT token refresh. If any of my parallel request fails, I will cancel the other requests and I will focus on refreshing my token.
Beta Was this translation helpful? Give feedback.
All reactions