Hello folks. When I create a lambda function for ...
# help
e
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
Yeah I think theres a field that is a boolean which tells you if it's encoded or not
m
Yeah there's a boolean key called
base64
in the
event
If it's true, you need to use
JSON.parse()
e
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.
In my case it's not json but classic url-encoded a=b format