Created
November 8, 2022 07:52
-
-
Save angstyloop/197ea69e9066b3576f1ffb72e19c69f0 to your computer and use it in GitHub Desktop.
node https get
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('https').get('https://www.google.com', it => { | |
console.log('statusCode:', it.statusCode); | |
console.log('headers:', it.headers); | |
it.on('data', it => process.stdout.write(it)); | |
}).on('error', console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment