I send the parameter to api gateway by postman and receive the result. So I try simple example in lambda,
exports.handler = (event, context, callback) => {
// TODO implement
const Idx = event.Idx * 2;
callback(null, Idx);
};
when I send Idx, It callback double of it.
I select raw in Body and doing that I can receive the result
But, I put "Content-Type" : "application/x-www-form-urlencoded" in Headers part, select x-www-form-urlencoded, it returns this.
{"message": "Could not parse request body into json: Unrecognized token \'Idx\': was expecting \'null\', \'true\', \'false\' or NaN\n at [Source: [B@331a45ec; line: 1, column: 5]"}
I want receive the data from postman by x-www-formurlencoded.
How I can do it?
If you know of it, please help me.