Making API Calls
Sample code to make API calls
var options = {
'method': 'GET',
'url': 'https://some-get-url.com/,
'headers': {
'Authorization': auth
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.statusCode, error, response.body);
});