Skip to content
masterclass Buddy

Angular · Function

provideHttpClient

Configures Angular's HttpClient for dependency injection. Optional feature functions customize behavior such as interceptors, the request backend, and XSRF protection.

Last updated

Syntax

provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders;

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • HttpClient
  • withInterceptors
  • withInterceptorsFromDi
  • withXhr
  • withRequestsMadeViaParent
  • withJsonpSupport
  • withXsrfConfiguration
  • withNoXsrfProtection

Source: provideHttpClient • Angular. Checked 2026-11-03.