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

Method intercept

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

* Identifies and handles a given JSONP request. * @param initialRequest The outgoing request object to handle. * @param next The next interceptor in the chain, or the backend * if no interceptors remain in the chain. * @returns An observable of the event stream.

(initialRequest: HttpRequest<any>, next: HttpHandler)

Source from the content-addressed store, hash-verified

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 3

runInInjectionContextFunction · 0.90
jsonpInterceptorFnFunction · 0.85
handleMethod · 0.65

Tested by

no test coverage detected