Created
August 3, 2018 02:34
-
-
Save leanfj/c67f0d06df1f4aacf9c1a05cab28f6f3 to your computer and use it in GitHub Desktop.
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
let loadUser = () => { | |
const xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'https://api.github.com/users/leanfj', true); | |
xhr.onload = () => { | |
let user = JSON.parse(xhr.responseText) | |
console.log(user); | |
} | |
xhr.send(); | |
} | |
loadUser(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment