W3cubDocs

/Angular

withInterceptorsFromDi

Includes class-based interceptors configured using a multi-provider in the current injector into the configured HttpClient instance.

API

function withInterceptorsFromDi(): HttpFeature<HttpFeatureKind.LegacyInterceptors>;

Description

Includes class-based interceptors configured using a multi-provider in the current injector into the configured HttpClient instance.

Prefer withInterceptors and functional interceptors instead, as support for DI-provided interceptors may be phased out in a later release.

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/common/http/withInterceptorsFromDi