nice-airport-15607
08/19/2020, 4:42 PMisBase64Encoded
property on API Gateways? I’m trying to make it false
, but not sure where to pass that in since the eventHandler
takes a aws.lambda.EventHandler<Request, Response>
, but I’m not sure how to pass those arguments along to the API when its pointing to a new `aws.lambda.CallbackFunction`… Thanks in advance.future-diamond-31373
08/20/2020, 8:22 AMlet payloadString = event.body;
if (event.isBase64Encoded) {
// Decode base64 encoded string
payloadString = Buffer.from(payloadString, 'base64').toString('binary');
}
// Parse payload string into an object
const payload = JSON.parse(payloadString);
It doesn't get override the property, but at least it makes the encoded event.body usablenice-airport-15607
08/20/2020, 3:13 PM