Closed chitgoks closed 4 years ago
As of right now there's not. You would have to check for this outside of the interceptor and do it manually. I could try to implement it but just out of curiosity: would you need to add parameters to the request or something like that?
no parameters. my use case for using your interceptor is there is no way in google sign in to know when an access token has expired so instead, i use interceptors to check the expiry time and refresh before sending the request
however i noticed the access token sometimes expires before expiry time and i have no idea why. so i find out about this only in response.
in case this happens i wish to call the request again from the interceptor (if its possible)
Ok, this seems more like a feature for a client, I think we could add a retry count and check for that when intercepting, that would mean that the request would have to be re-intercepted as well as the responses, is that the kind of behavior you want?
if that will work the same way as calling an http method (post/get/delete, etc) again, then yes. my goal is not having to call the url again.
i wonder if it is possible in the response, that you can call a method that will go back to the interceptResponse so it will re-run ?
The feature was implemented, waiting on release though. Hope it helps you! @chitgoks
Please take a look at Release 0.3.0. Feedback is always welcomed.
Is it possible when in the response, you find something that needs for the request to be re-run?