Skip to content

Clear function for interceptors #4247

@Landro3

Description

@Landro3

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions