I have a factory that is a wrapped $resource object and I am trying to include a custom header for http authentication. However, I am struggling to figure out how to pass data into the header.
app.factory('SomeFactory',['$resource', function($resource){
return $resource('https://third.party/:token',{token: access_token},{
get:{
method:'GET',
header:{
'some varialbe': my_var //I would like to pass this variable
}
}
});
}])