Created
March 15, 2017 17:43
-
-
Save cmvandrevala/ed41290d828640139b8b4ea40756dbf0 to your computer and use it in GitHub Desktop.
XMLHttpRequest for CORS Demonstration
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://localhost:3000'); | |
xhr.onload = function() { console.log(xhr.responseText); } | |
xhr.onerror = function() { console.log("There was an error!"); } | |
xhr.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment