const https = require('https'); var options = { hostname: 'registry.yarnpkg.com', port: 443, path: '/', method: 'GET' }; var req = https.request(options, (res) => { console.log('statusCode:', res.statusCode); console.log('headers:', res.headers); res…