Give the query through the console 404 response from the server 200?

I send request to server via GET ajax.

In response to receiving redirect is a 302 or 200 (if you look in the browser via the network).

And through the console 404. How can this be?

Need error to catch. 200 or 302, they then "come", but really "404".

The query is correct, if using a url, then everything works exactly the same answer you get via online verification services. Everything works 100% this application are created, but the console always says 404.

What's the matter?

Code:

type: "GET",
url : "HERE URL",
data: data,
success: function(response) {
console.log(response.status);
document.getElementById('result_form1').innerHTML = "Successfully";
},
error: function(response) {
console.log(response.status);
document.getElementById('result_form1').innerHTML = "Error.";
},
statusCode: {
302: function() {
console.log('redirect');
}
}
July 8th 19 at 15:33
1 answer
July 8th 19 at 15:35
If the server is not yours - most likely checks the type of request or UserAgent.

Find more questions by tags AJAXAPIJavaScriptComputer networksWeb Development