Skip to content

Commit 2d893cc

Browse files
dmkcjamesdaily
authored andcommitted
docs($http): note that default $http headers can be overridden
Closes angular#4750
1 parent 5cc6a4e commit 2d893cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ng/http.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ function $HttpProvider() {
290290
* with the lowercased HTTP method name as the key, e.g.
291291
* `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.
292292
*
293-
* Additionally, the defaults can be set at runtime via the `$http.defaults` object in the same
294-
* fashion.
293+
* The defaults can also be set at runtime via the `$http.defaults` object in the same
294+
* fashion. In addition, you can supply a `headers` property in the config object passed when
295+
* calling `$http(config)`, which overrides the defaults without changing them globally.
295296
*
296297
*
297298
* # Transforming Requests and Responses

0 commit comments

Comments
 (0)