HTTP GET request in JavaScript?

Browsers (and Dashcode) provide an XMLHttpRequest object which can be used to make HTTP requests from JavaScript: function httpGet(theUrl) { var xmlHttp = new XMLHttpRequest(); xmlHttp.open( “GET”, theUrl, false ); // false for synchronous request xmlHttp.send( null ); return xmlHttp.responseText; } However, synchronous requests are discouraged and will generate a warning along the lines of: … Read more