Example 1-9. HTTP request in Node.js

This example has been corrected from the original version by changing the url from https to http and removing the err parameter in the callback.


var http = require('http');

http.get('http://www.google.com', function (res) {
	console.log('got a response');
});