I am able to make REST API call using Postman/browser by passing Authorization token. However when I make the same call using AngularJS it's getting errored out. It's returning net::ERR_INSECURE_RESPONSE
I would like to know what can be possibly causing this error and how to fix this.
$http.get('https://hostname:8443/medrecdb-records', {
headers: {
'Authorization': 'Basic YWRtaW46UGFzc3dvcmQx' }})
.then(function (response) {
$scope.drug = response.data;
console.log("Response is: " + response);
}).catch(function (response) {
// Handle error
var data = response.data;
var status = response.status;
var statusText = response.statusText;
var headers = response.headers;
var config = response.config;
console.log("Response data is: " + data);
});