Getting json body in aws Lambda via API gateway
问题 I'm currently using NodeJS to build a bot on AWS lambda via AWS Api Gateway and I'm running into an issue with POST requests and JSON data. My api uses 'Use Lambda Proxy integration' and even when I test the proxy sending a content-type of Application/json and some json in the body e.g {"foo":"bar"} I can't access the object without parsing it first e.g var json = JSON.parse(event.body); console.log(json.foo); Now I know this doesn't seem a big deal just running it through JSON.parse, but I