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

Function chainedInterceptorFn

packages/common/http/src/interceptor.ts:167–178  ·  view source on GitHub ↗
(
  chainTailFn: ChainedInterceptorFn<unknown>,
  interceptorFn: HttpInterceptorFn,
  injector: EnvironmentInjector,
)

Source from the content-addressed store, hash-verified

165 * injector.
166 */
167export function chainedInterceptorFn(
168 chainTailFn: ChainedInterceptorFn<unknown>,
169 interceptorFn: HttpInterceptorFn,
170 injector: EnvironmentInjector,
171): ChainedInterceptorFn<unknown> {
172 return (initialRequest, finalHandlerFn) =>
173 runInInjectionContext(injector, () =>
174 interceptorFn(initialRequest, (downstreamRequest) =>
175 chainTailFn(downstreamRequest, finalHandlerFn),
176 ),
177 );
178}
179
180/**
181 * A multi-provider token that represents the array of registered

Callers 1

handleMethod · 0.90

Calls 1

runInInjectionContextFunction · 0.90

Tested by

no test coverage detected