map.apps Bundle APIs 4.20.0
    Preparing search index...

    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: AfterInterceptorData,
        ): void | Response | Promise<void | Response>;
        before(
            data: BeforeInterceptorData,
        ): undefined | void | Promise<undefined | void>;
    }
    Index

    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>