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

Function withInterceptors

packages/common/http/src/provider.ts:149–162  ·  view source on GitHub ↗
(
  interceptorFns: HttpInterceptorFn[],
)

Source from the content-addressed store, hash-verified

147 * @publicApi
148 */
149export function withInterceptors(
150 interceptorFns: HttpInterceptorFn[],
151): HttpFeature<HttpFeatureKind.Interceptors> {
152 return makeHttpFeature(
153 HttpFeatureKind.Interceptors,
154 interceptorFns.map((interceptorFn) => {
155 return {
156 provide: HTTP_INTERCEPTOR_FNS,
157 useValue: interceptorFn,
158 multi: true,
159 };
160 }),
161 );
162}
163
164const LEGACY_INTERCEPTOR_FN = new InjectionToken<HttpInterceptorFn>(
165 typeof ngDevMode !== 'undefined' && ngDevMode ? 'LEGACY_INTERCEPTOR_FN' : '',

Callers 2

provider_spec.tsFile · 0.90
resource_spec.tsFile · 0.90

Calls 2

makeHttpFeatureFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…