mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-05 21:54:42 +00:00
docs($http): fix adding default header to get request example
Initially, `$httpProvider.defaults.headers.get` is `undefined`, so `$httpProvider.defaults.headers.get['My-Header']='value'` will throw an error. Closes #4101
This commit is contained in:
parent
8c0d5b6e80
commit
01fdf683cf
1 changed files with 1 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ function $HttpProvider() {
|
||||||
* To add or overwrite these defaults, simply add or remove a property from these configuration
|
* To add or overwrite these defaults, simply add or remove a property from these configuration
|
||||||
* objects. To add headers for an HTTP method other than POST or PUT, simply add a new object
|
* objects. To add headers for an HTTP method other than POST or PUT, simply add a new object
|
||||||
* with the lowercased HTTP method name as the key, e.g.
|
* with the lowercased HTTP method name as the key, e.g.
|
||||||
* `$httpProvider.defaults.headers.get['My-Header']='value'`.
|
* `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.
|
||||||
*
|
*
|
||||||
* Additionally, the defaults can be set at runtime via the `$http.defaults` object in the same
|
* Additionally, the defaults can be set at runtime via the `$http.defaults` object in the same
|
||||||
* fashion.
|
* fashion.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue