function
Configures Angular's HttpClient
service to be available for injection.
provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders
features | HttpFeature<HttpFeatureKind>[] |
withInterceptors
withInterceptorsFromDi
withXsrfConfiguration
withNoXsrfProtection
withJsonpSupport
withRequestsMadeViaParent
withFetch
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