#R3XΛ-webhooks
1 messages · Page 1 of 1 (latest)
Hello! Starting up a thread for you
We've seen this for other users that use AWS lambda - the root issue here is that you need to do some additional configuration to make sure you're working with the raw request body
I believe you need to add a Body Mapping Template for Content-Type: application/json (just this – do not include ; charset=utf-8 afterwards) and the template should include the following:
{
"method": "$context.httpMethod",
"body": $input.json('$'),
"rawBody": "$util.escapeJavaScript($input.body).replaceAll("\\'", "'")",
"headers": {
#foreach($param in $input.params().header.keySet())
"$param": "$util.escapeJavaScript($input.params().header.get($param))"
#if($foreach.hasNext),#end
#end
}
}
Thanks for the swift reply, I think I did come across this solution. but this requires you to have API gateway set up as well.
is there any way I can get the raw body when using Lambda function URL ?
I know lambda function URLs are kind of new, but they seem to be super helpful , as they would eliminate the need for api gw.
That's something I'm not sure of - you'd need to do some more research on your end to see if this possible with lambda function URLs
alright thanks for your help