jeudi 2 juin 2016

Difference between CORS and HTTP requests to a 3rd party API

Are GET requests considered CORS since the request is obtaining resources from another domain?

I get from Wikipedia that CORS is:

"a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the resource originated."

However given this example:

$.ajax({
    type: "GET"
    url: "http://ift.tt/22AQ2UT".
    success: foo(data);
});

If www.mywebsite.com (a domain) made the above GET request to Twitch (a domain outside the domain) does this count as CORS?




Aucun commentaire:

Enregistrer un commentaire