I am using an angular's http get method but whenever I load the page it throws status code -1 or 0 error response. What is the mistake I am doing here? How to resolve this ? What is the reason for this status code?
var requ = {
method: 'GET',
url: "https://...",
headers: {
"Content-Type": "application/json"
}
}
$http(requ).then(function(response){
$scope.details=response.data.platform.record;
}, function(response){alert("failure1");alert(response.statusText);});