Created
July 22, 2013 02:34
Simple CORS (XHR) example. Note IE8< uses XDomainRequest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'http://corstest.pbojinov.c9.io/?feed=rss2'); | |
xhr.onreadystatechange = function () { | |
if (this.status == 200 && this.readyState == 4) { | |
console.log('response: ' + this.responseText); | |
} | |
}; | |
xhr.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment