Im trying to make a http request in Angular, and when i run it I get Unauthorized in the console. But if I run the request directly in the browser (Chrome) it works. Any suggestions how I can correct this?
$scope.getStorage = function() {
$http.get('http://username:[email protected]/api/storageinfo').success(function(response) {
console.log(response);
}).error(function(error){
console.log(error);
});
};
$scope.getStorage();
-
GET http://example.com/api/storageinfo/api/storageinfo 401 (Unauthorized)