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
Greetings! First of all, thank you for all your effort on the library, works great 😄
I am using version: 2.4.0.
I am using the interceptors to measure response time, so wanted to know a way I could pass in some kind of object as state between the request and the response functions. I am looking for something like this:
Forget my previous answer the problem is the url and config get merged in a fetch#Request object. I think to realize this the current solution needs to use CLS.
No worries!
Can't a third argument be passed by in between functions?
I created a fork that does that and does the trick, but I think it'd be better if I can use it already with the lib.
Let me know your thoughts!
Hey! I believe you can pass your state object to the config on your request, and then on your response and error interceptors you can access it via response.request.{your_state_object} and error.request.{your_state_object}, respectively.
Greetings! First of all, thank you for all your effort on the library, works great 😄
I am using version: 2.4.0.
I am using the interceptors to measure response time, so wanted to know a way I could pass in some kind of object as state between the request and the response functions. I am looking for something like this:
My request comes that if I store the state inside a file, I'll get the values overriden when different respond at different times.
Any way to walk this around? It could also work to access the state from within the response object, as we do with the request object.
Thanks!
The text was updated successfully, but these errors were encountered: