Skip to content

Instantly share code, notes, and snippets.

@starkfell
Created October 13, 2017 11:38
Show Gist options
  • Select an option

  • Save starkfell/ae200b1d9c3e9bb5541791cf2be72786 to your computer and use it in GitHub Desktop.

Select an option

Save starkfell/ae200b1d9c3e9bb5541791cf2be72786 to your computer and use it in GitHub Desktop.
var path = "url here"
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
this.responseText; //file content
}
};
xhttp.open("GET", path, true);
xhttp.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment