The requirement is that when the query needs to be called, the corresponding header value in the query should be changed
The code is as follows: Assume that the factory name is App
$resource("v1/app/volume/:id",{},{
query:{
method:'GET',
isArray:false,
headers: {
'Filter': 0
}
},
save:{
method:'POST',
isArray:false
}
});
When I call
App.query({},function(data){
},function(error){
});
如何将header中的Filter值设置为1?
I’d better use $http honestly, it can be realized