Skip to content

Instantly share code, notes, and snippets.

@aamsur-mkt
Created March 2, 2020 07:53
Show Gist options
  • Save aamsur-mkt/a6cf5da5817412ad5904877263478ac0 to your computer and use it in GitHub Desktop.
Save aamsur-mkt/a6cf5da5817412ad5904877263478ac0 to your computer and use it in GitHub Desktop.
Simple js http request
var theUrl = "https://google.co.id";
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
alert(xmlHttp.responseText);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment