Skip to content

Instantly share code, notes, and snippets.

@Kamilnaja
Created April 22, 2017 16:27
Show Gist options
  • Save Kamilnaja/81b167fc877ade76b86e604d16370121 to your computer and use it in GitHub Desktop.
Save Kamilnaja/81b167fc877ade76b86e604d16370121 to your computer and use it in GitHub Desktop.
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
// Typical action to be performed when the document is ready:
console.log(xhttp.responseText);
}
};
xhttp.open("GET", "json.json", true);
xhttp.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment