How to set custom headers with a $resource POST action?

64 Views Asked by At

headers for $resource is available since AngularJS

The format is

$resource('url/to/json', {}, {
    get: {
        method: 'GET',
        headers: { 'something': 'anything' }
    }
});

Above is working for Get Method but i would like to set custom header with $resource POST method

0

There are 0 best solutions below