This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($http): accept function as headers value
So we can request with dynamic header value. module.factory('Res', [ '$resource' '$routeParams' 'globalConfig' function($resource, $routeParams, globalConfig) { resource('/url/:id', {id: "@id"}, { patch: { method: 'patch', headers: { 'Authorization': function() { return "token " + globalConfig.token; } } } }); }]);
- Loading branch information
1 parent
0d124e1
commit a7150f1
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters