Skip to content

Instantly share code, notes, and snippets.

@zeqk
Created January 11, 2018 19:36
Show Gist options
  • Save zeqk/c9ca6b85f7693f550717d2bc4720ebe1 to your computer and use it in GitHub Desktop.
Save zeqk/c9ca6b85f7693f550717d2bc4720ebe1 to your computer and use it in GitHub Desktop.
var request = new XMLHttpRequest();
request.open('GET', '/bar/foo.txt', false); // `false` makes the request synchronous
request.send(null);
if (request.status === 200) {
console.log(request.responseText);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment