Thank you, the video instructions are very specific and detailed. I have a question, if I change the body in postman to x-www-urlencoded, which code in the lambda should I change and how? Can you guide me, thank you.
Hi, Thanks for watching :) you'll need to make a few changes in the way the Lambda function parses the request body in POST, PATCH, and DELETE. Let me show you POST as an example, So You'll need this -> from urllib.parse import parse_qs And then you will need to replace -> response = save_employee(json.loads(event['body'])) With the following code: parsed_body = parse_qs(event['body']) for key in parsed_body: parsed_body[key] = parsed_body[key][0] response = save_employee(parsed_body) I have not tested it but I think above would help achieve what you need. Hope this helps!
I am not getting the http method in event and if i print the event it only prints the payload.. i want to fetch the http method but i am unable to do that