-1

I managed to get the following working in Lambda (not throwing errors) but how can I see the actual response json?

var https = require('https');

exports.handler = function (event, context) {
  https.get('https://www.quandl.com/api/v3/datasets/FRED/M12015USM144NNBR.json?  api_key=XXXXXXXXXXXXXXXX', function (result) {
    console.log('Success, with: ' + result.statusCode);
    context.done(null);
  }).on('error', function (err) {
    console.log('Error, with: ' + err.message);
    context.done("Failed");
  });
};
hthomas
  • 23
  • 7
  • 1
    Where do you want to "see" it? It's in the `result` object. Log it or pass it to the `context.done()` function. – Mark B Mar 07 '17 at 23:06

1 Answers1

0

HMMM... isn't (result) comes back with the object contains with the request response from data event?

Where is body in a nodejs http.get response?

Community
  • 1
  • 1