Skip to content

Instantly share code, notes, and snippets.

@delor34n
Last active February 5, 2017 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delor34n/9581544875048d90ca20b4f40ece1dbe to your computer and use it in GitHub Desktop.
Save delor34n/9581544875048d90ca20b4f40ece1dbe to your computer and use it in GitHub Desktop.
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 3. in line 2.
function httpGet(theUrl){
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( 'GET', theUrl, false ); // false for synchronous request
//xmlHttp.setRequestHeader() debe ir después de xmlHttp.open()
xmlHttp.setRequestHeader('nombreHeader', 'valor');
//pero antes de xmlHttp.send()
xmlHttp.send( null );
return xmlHttp.responseText;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment