1const https = require('https');
2
3https.get('https://encrypted.google.com/', (res) => {
4 console.log('statusCode:', res.statusCode);
5 console.log('headers:', res.headers);
6
7 res.on('data', (d) => {
8 process.stdout.write(d);
9 });
10
11}).on('error', (e) => {
12 console.error(e);
13});