https.get(options, callback)
Like http.get()
but for HTTPS.
options
can be an object or a string. If options
is a string, it is automatically parsed with url.parse()
.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 | const https = require( 'https' ); console.log( 'statusCode: ' , res.statusCode); console.log( 'headers: ' , res.headers); res.on( 'data' , (d) => { process.stdout.write(d); }); }).on( 'error' , (e) => { console.error(e); }); |
Please login to continue.