我是angularjs的新手。我正在尝试创建一个需要WSSE授权的REST API请求。我已将它包含在请求的标题中,但它仍然无法正常工作。有什么建议吗? sectorProvider.js
var defer = $q.defer();
this.getSectors = function () {
$http({
url: 'http://localhost/webapp/web/app_dev.php/api/sectors',
method: 'GET',
headers: {
'Authorization': 'WSSE profile="UsernameToken"',
'Accept-Language': 'fr',
'Content-Type': 'application/json',
'x-wsse': 'UsernameToken Username="superadmin", PasswordDigest="ey69TSz06CUfb3inNS1gWl5/CQM=", Nonce="MTEyZGEwN2ZkN2ZjNzczZg==", Created="2016-05-31T11:05:25Z"'
}
})
.then(function (response) {
defer.resolve(response.data);
}, function (response) {
defer.reject(response);
});
return defer.promise;
};