Created
September 18, 2019 00:25
-
-
Save leroyrosales/c0db446d2cafc9f959db2efdd595bb88 to your computer and use it in GitHub Desktop.
Vanilla AJAX
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', 'JSON_OR_API', true); | |
xhr.onload = function() { | |
if (this.status == 200) { | |
// DO SOMETHING | |
} | |
} | |
xhr.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment