mardi 7 mars 2017

AWS Lambda web service calls

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('http://ift.tt/2mCFgBK?  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");
  });
};




Aucun commentaire:

Enregistrer un commentaire