Chapter 16
Getting Ready to Serve Using REST APIs
IN THIS CHAPTER
Looking at the various components of a REST API
Creating and testing a REST API in Go
In Chapter 15, I explain how to consume web services using Go. But one of the strengths of Go is server-side implementation (back-end services such as web applications, web services, and so on) due to its strong support for concurrency programming. So, in this chapter, I show you how to use a third-party package to easily develop a web service using an architecture known as REST API.
Building Web Services Using REST APIs
When it comes to building web services, you may have heard of the term REST. But what exactly is REST and how does it really work? In this section, I explain what REST is and how you can make your web service a RESTful one.
REST stands for representational state transfer. It’s a software architectural style that defines how a web service should work and behave. REST is designed to take advantage of existing protocols. It usually uses HTTP for communicating between the client and the service.
A REST API uses several ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
A web service that conforms to the REST architectural style is commonly known as a RESTful API.