Working with REST APIs
The subject of this chapter is the development of RESTful servers and clients with the Go programming language, which is one of the many areas where Go excels.
REST is an acronym for REpresentational State Transfer and is primarily an architecture for designing web services that offers a standardized efficient way for clients to access data and use the provided server functionality.
RESTful services usually use the JSON format to exchange information, which is well supported by Go. REST is not tied to any operating system or system architecture and is not a protocol; however, to implement a RESTful service, we need to use a protocol such as HTTP or HTTPS as REST is an API convention built on the HTTP(S) protocol.
Although we are already familiar with most of the presented Go code, the ideas behind REST and the way Go code serves them are going to be new. The epicenter of the development of RESTful servers is the definition of the appropriate Go structures...