MCPcopy Create free account
hub / github.com/angular/angular / intercept

Method intercept

packages/common/http/src/xsrf.ts:141–145  ·  view source on GitHub ↗
(initialRequest: HttpRequest<any>, next: HttpHandler)

Source from the content-addressed store, hash-verified

139 private readonly injector = inject(EnvironmentInjector);
140
141 intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
142 return runInInjectionContext(this.injector, () =>
143 xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)),
144 );
145 }
146}

Callers

nothing calls this directly

Calls 3

runInInjectionContextFunction · 0.90
xsrfInterceptorFnFunction · 0.85
handleMethod · 0.65

Tested by

no test coverage detected