Skip to content

Instantly share code, notes, and snippets.

@daidokoro
Created September 7, 2018 09:41
Show Gist options
  • Save daidokoro/e4c98a4e85551d2009fcc1b101c95cb2 to your computer and use it in GitHub Desktop.
Save daidokoro/e4c98a4e85551d2009fcc1b101c95cb2 to your computer and use it in GitHub Desktop.
Quick HTTP Get Function for Javascript
function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
xmlHttp.send( null );
return xmlHttp.responseText;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment