MCPcopy
hub / github.com/angular/angular / adaptLegacyInterceptorToChain

Function adaptLegacyInterceptorToChain

packages/common/http/src/interceptor.ts:159–167  ·  view source on GitHub ↗
(
  chainTailFn: ChainedInterceptorFn<any>,
  interceptor: HttpInterceptor,
)

Source from the content-addressed store, hash-verified

157 * `ChainedInterceptorFn` interface.
158 */
159export function adaptLegacyInterceptorToChain(
160 chainTailFn: ChainedInterceptorFn<any>,
161 interceptor: HttpInterceptor,
162): ChainedInterceptorFn<any> {
163 return (initialRequest, finalHandlerFn) =>
164 interceptor.intercept(initialRequest, {
165 handle: (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn),
166 });
167}
168
169/**
170 * Constructs a `ChainedInterceptorFn` which wraps and invokes a functional interceptor in the given

Callers

nothing calls this directly

Calls 1

interceptMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…