I'm trying to get a Rest service with angular:
angular.module('coursExoApp').factory('serviceAjax', function ($http) {
return{
objects: function(){
var test=$http({
method: 'GET',
url: 'http://------------/Windchill/servlet/rest/changes/objects/getReports',
headers: {
'Authorization': 'Basic d2NhZG1pbjp3Y2FkbWlu'
}
}).
success(function(data, status, headers, config) {
console.log('success');
}).
error(function(data, status, headers, config) {
console.log(config);
});
return test;
}
}});
and i'm getting this error: IMAGE HERE
The service with basic authentification works fine with postMan. thanks for help