Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var http = require('http');
- var options = {
- host: 'www.google.com',
- path: '/index.html'
- };
- http.get(options, function(res) {
- console.log('STATUS: ' + res.statusCode);
- console.log('HEADERS: ' + JSON.stringify(res.headers));
- }).on('error', function(e) {
- console.log('ERROR: ' + e.message);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement