Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Get Request Node HTTP

const https = require('node:https');

https.get('https://encrypted.google.com/', (res) => {
  console.log('statusCode:', res.statusCode);
  console.log('headers:', res.headers);

  res.on('data', (d) => {
    process.stdout.write(d);
  });

}).on('error', (e) => {
  console.error(e);
});
Source by nodejs.org #
 
PREVIOUS NEXT
Tagged: #Get #Request #Node #HTTP
ADD COMMENT
Topic
Name
5+5 =