As you start playing with RESTful APIs, you are bound to
encounter errors. You can use several techniques to
determine the nature of a problem. As you saw in Table
7-3, RESTful APIs use several mechanisms to indicate
the results of REST calls and errors that occur during
processing. You can use these methods to start your
debugging journey for a RESTful application. Usually the
error code returned is the biggest hint you can receive.
Once you have this information, you can use tools like
Postman and curl to make simple API calls and see the
sent and response headers. In addition, other tools that
are built in to web browsers can allow you to see traces
and do other types of debugging. Most browsers include
some type of developer tools, such as Safari’s Web
Development Tools, Chrome’s DevTools, and Firefox’s
Developer Tools. Such tools are included with browsers
by default and enable you to inspect API calls quickly.
Finally, if you plan on building your own test
environment or sandbox, you might want to use tools
like Simple JSON Server (an open-source server that you
can clone and run in your environment for playing with
and learning about RESTful APIs).
EXAM PREPARATION TASKS
As mentioned in the section “How to Use This Book” in
the Introduction, you have a couple of choices for exam
preparation: the exercises here, Chapter 19, “Final
Preparation,” and the exam simulation questions in the
Pearson Test Prep Software Online.
REVIEW ALL KEY TOPICS
Review the most important topics in this chapter, noted
with the Key Topic icon in the outer margin of the page.
Table 7-5 lists these key topics and the page number on
which each is found.