W3cubDocs

/Angular

JsonpInterceptor

Identifies requests with the method JSONP and shifts them to the JsonpClientBackend.

API

class JsonpInterceptor {
  constructor(injector: EnvironmentInjector): JsonpInterceptor;
  intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
}

constructor

JsonpInterceptor
@paraminjectorEnvironmentInjector

intercept

Observable<HttpEvent<any>>

Identifies and handles a given JSONP request.

@paraminitialRequestHttpRequest<any>

The outgoing request object to handle.

@paramnextHttpHandler

The next interceptor in the chain, or the backend if no interceptors remain in the chain.

@returnsObservable<HttpEvent<any>>

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/common/http/JsonpInterceptor