Interface Interceptor

An interceptor can intercept and manipulate requests (and their responses) before or after they have been sent to the server.

interface Interceptor {
    after?(data): void | Response | Promise<void | Response>;
    before?(data): undefined | void | Promise<undefined | void>;
}

Methods

Methods

  • This method will be invoked after the server responded to a request. The implementor may substitute a custom response instead.

    Parameters

    Returns void | Response | Promise<void | Response>

  • This method will be invoked before a request is sent to the server. The implementor may alter the input arguments (e.g. query parameters in BeforeInterceptorData.target).

    Parameters

    Returns undefined | void | Promise<undefined | void>

Generated using TypeDoc