Interface NetworkInterceptorController

Network interceptor API which can be used to intercept network requests and responses.


- Request interceptors will be executed in the order they were added.
- InterceptableRequest.respondWith can be called at most once, otherwise an error will be thrown.

interface NetworkInterceptorController {
    addRequestInterceptor(interceptor: RequestInterceptor): void;
    addResponseInterceptor(interceptor: ResponseInterceptor): void;
    removeRequestInterceptor(interceptor: RequestInterceptor): void;
    removeResponseInterceptor(interceptor: ResponseInterceptor): void;
}

Hierarchy (view full)

  • NetworkInterceptorController

Methods