Hello folks. When I create a lambda function for my POST API route the parameters passed by the client (in the body) arrive in my function code as a base64 encoded string in event.body ? Is this normal/expected and I should just decode the string or is there a parameter I should set at the API or route level to get decoded and ideally individual params ?
t
thdxr
11/17/2021, 1:07 PM
Yeah I think theres a field that is a boolean which tells you if it's encoded or not
m
manitej
11/17/2021, 1:08 PM
Yeah there's a boolean key called
base64
in the
event
If it's true, you need to use
JSON.parse()
e
Erik Robertson
11/17/2021, 1:21 PM
ok thanks. I would have hoped there was an upstream setting that would decode it before making calling my function but you seem to imply that's not the case and I have to do it myself. Thanks for taking the time to reply.
Erik Robertson
11/17/2021, 1:22 PM
In my case it's not json but classic url-encoded a=b format