angular.js - How to modify the header value that already exists in $resource?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-15 17:00:37
0
1
488

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?
曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(1)
巴扎黑

I’d better use $http honestly, it can be realized

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template