Skip to content

Instantly share code, notes, and snippets.

Created August 2, 2011 06:47
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 anonymous/1119709 to your computer and use it in GitHub Desktop.
Save anonymous/1119709 to your computer and use it in GitHub Desktop.
xhr = new XMLHttpRequest();
xhr.open('GET', 'http://google.com', true);
xhr.onreadystatechange = function(e) {
console.log(xhr.status);
};
try {
xhr.send();
console.log('request sent');
} catch (e) {
console.log(e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment