Last active
September 19, 2016 00:39
-
-
Save DylanPiercey/d283953be55dc0d4c20b0d08ea4430f2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const xhr = new XMLHttpRequest(); | |
xhr.onload = () => { | |
// Consume response body. | |
const body = xhr.responseText; | |
} | |
xhr.onerror = (e) => { | |
console.log(`Got error: ${e.message}`); | |
} | |
oReq.open("GET", 'http://www.google.com/index.html'); | |
oReq.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment