Building a REST Client
So far, we have seen what a REST API is and how to explore it, but the whole point of an API is to interact with it. For that, you need to build a client to make API requests and process the responses.
In this chapter, we will explore building a REST client in Go using only the standard library. Go is an excellent language for this task because it comes with the batteries included, and the standard library has everything you need to build a REST client.
As part of the exploration, we are going to cover the following:
- The Go HTTP client
- Request and Response objects
- Building your API client