July 2018
Intermediate to advanced
324 pages
8h 14m
English
Let's execute the random quote API. The following is a snippet of the random quote API execution:
$ curl -s -w 'Total time taken: %{time_total}\n' https://0uqnn5ql3a.execute-api.ap-south-1.amazonaws.com/dev/quote?type=random{"quote": "A friendship founded on business is better than a business founded on friendship.", "author": "John D. Rockefeller", "category": "Famous"}Total time taken: 1.369
You can see that this execution takes 1.369 seconds, because we are explicitly making another request to the Mashape API to fetch the random quote. We can make this execution faster by adding caching support to the API Gateway service.
Read now
Unlock full access