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
Currently ejecting interceptors is complicated when they are not defined statically, and managing them dynamically gets messy. I'd like to request using similar logic to axios in adding and removing interceptors.
E.g. we need this functionality because we need to have an interceptor that changes depending on state that is stored in context. So when the state within the context changes, we need to update the interceptor. Accessing an interceptor doesn't really work with the current client in this case.
I've put some suggested changes below to the interceptors class. The purpose of these changes is to expose the index of each interceptor to allow easier removal and also add the ability to update an interceptor based on the index.
Description
Currently ejecting interceptors is complicated when they are not defined statically, and managing them dynamically gets messy. I'd like to request using similar logic to axios in adding and removing interceptors.
E.g. we need this functionality because we need to have an interceptor that changes depending on state that is stored in context. So when the state within the context changes, we need to update the interceptor. Accessing an interceptor doesn't really work with the current client in this case.
I've put some suggested changes below to the interceptors class. The purpose of these changes is to expose the index of each interceptor to allow easier removal and also add the ability to update an interceptor based on the index.
The text was updated successfully, but these errors were encountered: