RESTful services may or may not be a part of a web application. A web application may call or consume external APIs or services from the same application. The program that enables the interaction or communication (request, response) between the services and the application consuming those services is called a client.
A client helps applications to communicate (Request, Response) with APIs.
In this section, we will create a web client. A web client is an application or program written in ASP.NET Core.
Before we build a test web client, we need to discuss what we have to call.
Continuing our example of the FlixOne BookStore, the following table lists the produces and services that we will call and consume:
API resource |
Description |
GET /api/product |
Gets a list of products. |
GET /api/product{id} |
Gets a product. |
PUT /api/product{id... |