我设法在 Lambda 中实现以下工作(不抛出错误),但如何查看实际的响应 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");
});
};
HMMM...(结果)不是随数据事件的请求响应中包含的对象一起返回吗?