I know how to access GET string variables in a Node js Lambda that is integrated with API Gateway with:
event["queryStringParameters"]["variable_name"]
What is the equivalent for accessing POST variables?
Use the following
if (event.body !== null && event.body !== undefined) {
let body = JSON.parse(event.body) //use in case of JSON body
//your code
}
AWS Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With