Skip to content

Instantly share code, notes, and snippets.

@pewerner
Created December 9, 2012 15:01
Show Gist options
  • Save pewerner/4245462 to your computer and use it in GitHub Desktop.
Save pewerner/4245462 to your computer and use it in GitHub Desktop.
Http Request JavaScript
var http_request = new ActiveX("Msxml2.XMLHTTP");
var url = "http://localhost:3000/users/2.json"
http_request.open( "GET", url, true );
http_request.send(null);
//--This is what you get back from the request
var response = http_request.responseText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment