W3cubDocs

/Angular

provideHttpClient

function

Configures Angular's HttpClient service to be available for injection.

See more...

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

Parameters
features HttpFeature<HttpFeatureKind>[]
Returns

EnvironmentProviders

See also

Description

By default, HttpClient will be configured for injection with its default options for XSRF protection of outgoing requests. Additional configuration options can be provided by passing feature functions to provideHttpClient. For example, HTTP interceptors can be added using the withInterceptors(...) feature.

© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/common/http/provideHttpClient