Despite what you use to make a request the concept is still the same

We will use request from npm in this guide

npm install request

var request = require('request');
request('', function (error, response, body) {
console.log('error:', error);
console.log('statusCode:', response && response.statusCode);
console.log('body:', body);

To run the file use this command:

node filename.js