Skip to content

Instantly share code, notes, and snippets.

@alexmcpherson
Last active August 29, 2015 13:56
Show Gist options
  • Save alexmcpherson/9203968 to your computer and use it in GitHub Desktop.
Save alexmcpherson/9203968 to your computer and use it in GitHub Desktop.
Raw XHR Sample
//executed from api.jquery.com
function reqListener () {
console.log(this.responseText);
}
var oReq = new XMLHttpRequest();
oReq.onload = reqListener;
oReq.open("get", "http://api.jquery.com/robots.txt", true);
oReq.send();
$.get('http://api.jquery.com/robots.txt', function(response){
console.log(response);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment