Processing Request Parameters

In this lesson, you will learn how to process request parameters​ using the `httpMethod` field.

We'll cover the following

You now add a handler to deal with form submissions. You did not set a specific form action URL, but you did set the form method to POST. When the form is submitted, this will make your browser send the information to the same URL where the form was displayed, but it will be using the HTTP POST method. You can use the method to differentiate between actions. If the Lambda function receives a GET call, it can show the form. If it receives a POST call, it can process the submission.

httpMethod field #

In Chapter 4, you added some simple event logging into the sample function. Open the CloudWatch log and look at one of those events. You’ll see that the method is in the httpMethod field of the event.

Get hands-on with 1000+ tech skills courses.