MCPcopy Index your code
hub / github.com/angular/angular / JsonpInterceptor

Class JsonpInterceptor

packages/common/http/src/jsonp.ts:323–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321 */
322@Injectable()
323export class JsonpInterceptor {
324 constructor(private injector: EnvironmentInjector) {}
325
326 /**
327 * Identifies and handles a given JSONP request.
328 * @param initialRequest The outgoing request object to handle.
329 * @param next The next interceptor in the chain, or the backend
330 * if no interceptors remain in the chain.
331 * @returns An observable of the event stream.
332 */
333 intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
334 return runInInjectionContext(this.injector, () =>
335 jsonpInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)),
336 );
337 }
338}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…