{ "id": "api/common/http/JsonpInterceptor", "title": "JsonpInterceptor", "contents": "\n\n
\n
\n
\n \n API > @angular/common > @angular/common/http\n
\n \n
\n \n
\n

JsonpInterceptorlink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

Identifies requests with the method JSONP and\nshifts them to the JsonpClientBackend.

\n\n \n
\n \n \n \n
\n\nclass JsonpInterceptor {\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>\n}\n\n\n \n \n\n
\n\n\n \n
\n

See alsolink

\n \n
\n\n\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n
\n

Methodslink

\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n

\n intercept()\n \n link

\n \n
\n
\n

Identifies and handles a given JSONP request.

\n\n
\n
\n \n\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n req\n HttpRequest\n

The outgoing request object to handle.

\n\n
\n \n next\n HttpHandler\n

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

\n\n
\n\n \n
Returns
\n

Observable<HttpEvent<any>>: An observable of the event stream.

\n\n \n\n\n \n\n \n
\n
\n\n \n
\n\n\n\n \n\n\n
\n
\n\n\n" }