Created
April 25, 2018 05:38
-
-
Save evolkmann/28e72447ed40aeecee5c09a513fc8b2c 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 performARequest = () => { | |
const httpRequest = new XMLHttpRequest(); | |
httpRequest.onreadystatechange = () => { | |
if (httpRequest.readyState === 4 && httpRequest.status === 200) { | |
console.log('Request successful!'); | |
} | |
}; | |
httpRequest.open('GET', window.ENVIRONMENT.backendUrl + '/users/john'); | |
httpRequest.send(); | |
}; | |
performARequest(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment