Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created December 19, 2019 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/4ad658a6595298412708cdf6289cc560 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/4ad658a6595298412708cdf6289cc560 to your computer and use it in GitHub Desktop.
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
// Do something with the result
} else {
// Handle error
}
};
xhttp.open("GET", url, true);
xhttp.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment