aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMr.Raindrop2013-09-22 20:34:01 +0800
committerPete Bacon Darwin2013-09-25 22:27:33 +0100
commit7e5154e7552d1c631fe9fcf5e82f7c9a37fda5ca (patch)
tree4245fc29e3c16bb82d1e9cb2e6d544adc0520377
parentec6b1cfaba314c51b59d34e6078ad692dbdf8e5f (diff)
downloadangular.js-7e5154e7552d1c631fe9fcf5e82f7c9a37fda5ca.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
-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 7dabfba1..970e42f1 100644
--- a/src/ng/http.js
+++ b/src/ng/http.js
@@ -251,7 +251,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.