Use $httpProvider
to change the default behavior of the $http service.
Configure $http service to combine processing of multiple http responses received at around the same time via $rootScope.$applyAsync. This can result in significant performance improvement for bigger applications that make many HTTP requests concurrently (common during application bootstrap).
Defaults to false. If no value is specified, returns the current configured value.
Param | Type | Details |
---|---|---|
value (optional) | boolean | If true, when requests are loaded, they will schedule a deferred "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window to load and share the same digest cycle. |
boolean Object
|
If a value is specified, returns the $httpProvider for chaining. otherwise, returns the current configured value. |
Object containing default values for all $http requests.
|
Array containing service factories for all synchronous or asynchronous $http pre-processing of request or postprocessing of responses. These service factories are ordered by request, i.e. they are applied in the same order as the array, on request, but reverse order, on response. |
Array containing URLs whose origins are trusted to receive the XSRF token. See the Security Considerations sections for more details on XSRF. Note: An "origin" consists of the URI scheme, the hostname and the port number. For It is not possible to whitelist specific URLs/paths. The
path , query and fragment parts of a URL will be ignored. For example, https://foo.com/path/bar?query=baz#fragment will be treated as https://foo.com , meaning that all requests to URLs starting with https://foo.com/ will include the XSRF token. |
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.7.8/docs/api/ng/provider/$httpProvider