Understanding web API clients
Before we start consuming the BooksStore
API, let’s talk a bit about web APIs. Basically, an API is a kind of interface for a set of functions, and this interface is accessible by code.
Let’s take smartphone notifications as an example. If you are developing an app for a smartphone, be it iOS or Android, the operating system provides you with an API to deal with its notification functionality for things such as showing a new notification or defining what should happen when you click on a notification.
A web API is also an application programming interface, as the name suggests, but it’s accessible over the web via HTTP. It’s a kind of web application that exposes certain functionalities and is hosted on a server somewhere in the world. Your application can consume the functions that the web API exposes by sending HTTP requests, and it will send you the status of the data received in an HTTP response.
Web APIs are a...