Instead of this:
$http.defaults.headers.common['Authorization'] = cred;
return $resource('/api/cases/store').save();
Do this:
return $resource('/api/cases/store', {}, {
save: {
method: 'POST',
headers: { 'Authorization': cred }
}
}).save();
Note that you have to use 'save' as the action, the first key in the third parameter. Can't test it, so let me know if it works.
And I agree. The documentation doesn't talk about it. Take a look at the DEFAULT_ACTIONS list in the $resource source-code in angular-resource.js