I think I am beginning to understand this new way of thinking (I am used to Arduinos procedural way of doing things)
So do you think this is the way to do it ?:
ESP8266WiFi.init();
var hostname="www.eecs.mit.edu";
ESP8266WiFi.getHostByName(hostname, function(ipAddress){
var http = require("http");
http.get({host: ESP8266WiFi.getAddressAsString(ipAddress), port: 80, path: "/"},
function(response) {
print("get callback!");
response.on('data', function(data) {
print(data);
});
response.on('close', function() {
print("The response connection closed");
});
});
});