Shashank G
Shashank G

Reputation: 992

how to solve http status code -1 error

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);});

Upvotes: 4

Views: 24870

Answers (2)

Patrick Andre
Patrick Andre

Reputation: 1

if you use:

@grantolator:;3#8defect (ionic)/codebuilder\ !infection073!"73.98.12=infection {"status":-1,"code":""} UnInfect"73.98.12 apply

or you can use

.inspection."@¤=+!" In a form of (Identify.Altoffer.Complete%20") "Apply=((true))""inspect"-True=defect-" Gamerule. False

This should Work

Upvotes: -2

Adam Reis
Adam Reis

Reputation: 4483

We tend to get -1 status codes when there are network issues or connection problems, so we display the user a network problems page in those cases. It doesn't have to do with CORS as far as I'm aware.

Upvotes: 11

Related Questions