You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking forward for feature that supported by fetch, but as i see from source it is not possible with your library for now. I need to use previous Request instance with method fetch (retrying requests that was rejected by server in cases of status 502, for example)
Hi! I figured out how to write an interceptor with desired behaivour, but as for me it's awkward.
I added callback retry into options param, and then in request interceptor i store it in a variable, delete its link from options and after that in response interceptor if (in my case) status of response is one of 502, 503, 504 - i push it to the queue. Than, after 10 seconds of waiting, i will retry all callbacks that stored in queue.
Retrying implemented with internals of your library should be helpful. I think it would be wounderful to configure retry timeout on new client instance creation and don't call response callback in then method when it has statuses from the defined list.
But if you have another opinion or suggestion, please let me know
Hello, @starlight36
I'm looking forward for feature that supported by fetch, but as i see from source it is not possible with your library for now. I need to use previous Request instance with method fetch (retrying requests that was rejected by server in cases of status 502, for example)
https://developer.mozilla.org/en-US/docs/Web/API/Request#Examples
Please, say, do you see any way to do it using your library?
The text was updated successfully, but these errors were encountered: