I am totally new to ionic. In my project, the API both have a basic authentication. The API then run OK on Postman, but don't know how to do it on ionic. I have research for several articles but they need a lot of step to follow after some steps I get lost.
Here is my code:
app.controller('MainViewController', function ($scope, $http) {
$http({
method:"GET",
url:"my_url"
}).then(function(categories){
console.log(categories);
});
});
I got the error on console:
GET "my_url" 401 (Unauthorized)
And the header then:
Do you know what is the proper way to do this on ionic
