-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Clear function for interceptors #4247
Copy link
Copy link
Closed
Description
Is your feature request related to a problem? Please describe.
In my front-end application, I need to clear all interceptors that may have been created through other UI elements.
Describe the solution you'd like
A clear() function on the request or response interceptor object to more easily clear existing interceptors.
Describe alternatives you've considered
I currently access the handlers property of the InterceptorManager directly, which is not as clear as it could be.
Additional context
Current method: axiosInstance.interceptors.request.handlers = []; // or null
Proposed method: axiosInstance.interceptors.request.clear();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels