jQuery ajax "error", status 0, no response text, but tamper data shows it was a successful response 200?

74 views Asked by At

This is my code:

$.ajax({
    url: "https://api.instagram.com/v1/users/self/feed?access_token=" + TOKEN_HERE,
    type: "GET",
    processData: false,
    dataType: "text",
    success: function(data) {

        console.log(data);
    },
    error: function(xhr, status, data) {
        console.log("err", xhr.responseText, xhr.statusCode, data, status);
    }
});

It prints:

"err" "" 0 "" "error"

tamper data shows:

enter image description here

I even tried plain Ajax, no jQuery, and it did the same thing!

I see this question but it is apparently not the same problem as mine: jquery ajax error {"readyState":0,"responseText":"","status":0,"statusText":"error"} Because I tested this on w3schools html simulator and it led to the same result. So it cannot be that something is interfering with my async code.

Thanks..

0

There are 0 answers