aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/http.js
diff options
context:
space:
mode:
authorMr.Raindrop2013-09-22 20:34:01 +0800
committerPete Bacon Darwin2013-09-25 22:23:16 +0100
commit01fdf683cf089931d2ccb223eb374d0c52b3d235 (patch)
treeba8afe36cf14093f6c372e67bb2af86fec243752 /src/ng/http.js
parent8c0d5b6e80950f6c05e6c101e9cc905ca5b3226f (diff)
downloadangular.js-01fdf683cf089931d2ccb223eb374d0c52b3d235.tar.bz2
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
Diffstat (limited to 'src/ng/http.js')
-rw-r--r--src/ng/http.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/http.js b/src/ng/http.js
index c958f414..3b2ac8d6 100644
--- a/src/ng/http.js
+++ b/src/ng/http.js
@@ -286,7 +286,7 @@ function $HttpProvider() {
* 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
* 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
* fashion.