Task

Access and print a URL's content (the located resource) to the console.

There is a separate task for HTTPS Requests.




var req = new XMLHttpRequest();
req.onload = function() {
  console.log(this.responseText);
};
 
req.open('get', 'http://rosettacode.org', true);
req.send()