Serverless Programming Cookbook
上QQ阅读APP看书,第一时间看更新

Testing the API

You can test the API from Postman (or any other REST client of your choice) by passing the request in the expected format; you should get the expected response message. If you use the sample JSON method provided at the start of this section, you should get a response of Good Morning, Heartin.

If you send an invalid request (say, {}), you should get an error message with a response code of 400, as shown in the following screenshot: