angular/angular.js — pull request #3122 by bolasblack (2013-07-03 07:53:05+00:00)
Title: feat($http): accept function as headers value

So we can request with dynamic header value.

```javascript
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;
}
}
}
});
}]);
```