Skip to content

Instantly share code, notes, and snippets.

@jucrouzet
Last active August 29, 2015 13:55
Show Gist options
  • Save jucrouzet/8784489 to your computer and use it in GitHub Desktop.
Save jucrouzet/8784489 to your computer and use it in GitHub Desktop.
(function(xhr) {
var request = new xhr();
request.open('GET', 'http://www.urldemonflux.com/blah', true);
request.onreadystatechange = function () {
if (request.readyState === xhr.LOADING) {
if(request.status === 200) {
window.console.log(request.responseText);
}
}
};
request.send(null);
})(window.XMLHttpRequest);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment