我正在用handleRequest
搜索Node.Js的lambda函数中使用AWS HttpClient aws sdk
来搜索ElasticSearch url。我正在关注AWS文档。
https://docs.amazonaws.cn/en_us/elasticsearch-service/latest/developerguide/es-request-signing.html
请查看下面的代码块。在那个控制台日志中 仅记录{},并且根本不调用handle Request方法。
var client = new AWS.HttpClient();
//logs only {}
console.log("client", client);
//Not being called and no logs at all
client.handleRequest(request, null, function(response) {
console.log(response.statusCode + ' ' + response.statusMessage);
var responseBody = '';
response.on('data', function (chunk) {
responseBody += chunk;
});
response.on('end', function (chunk) {
console.log('Response body: ' + responseBody);
});
}, function(error) {
console.log('Error: ' + error);
});
}