2 Getting set up to make API requests

 

This chapter covers

  • Introducing the FarmStall API and some of its business logic
  • Introducing a tool to make HTTP requests: Postman
  • Executing API requests and inspecting the responses

Our task in this part of the book is to describe an API called FarmStall. FarmStall was designed specifically for this book, and it is intentionally as simple as possible. Before we can describe this API, we’ll need to understand how it works and be able to make HTTP requests and inspect the responses.

In this chapter we’ll use a tool called Postman to make HTTP requests against the FarmStall API (see figure 2.1). We’ll be verifying that we get decent-looking responses without concerning ourselves too much with the details of those responses. We’ll also take a basic look at the business domain of the API. We won’t go into great detail, but we’ll learn enough so that we have an understanding of what we’re doing. This will make it easier to describe later on.

Figure 2.1 Where we are
02-01

These are the sources for the points we’ll be touching on:

2.1 The problem

2.1.1 FarmStall API overview

2.1.2 The first two operations of the FarmStall API

2.2 Getting set up with Postman

2.3 FarmStall API

2.4 Our first request

2.4.1 Forming a GET request in Postman

2.4.2 Verification

2.5.2 Verification