The client-server architecture

RESTful APIs rely on the client-server architecture. This simply means that for RESTful APIs, you need two main components—a client and a server. A client sends an HTTP request to a server, and the server replies with an HTTP response to the client. A single server typically handles numerous clients at the same time:

The preceding diagram can be explained with the help of following points:

  • The client is the component that initiates the API request. A client either asks for a resource from a server, or sends a resource to a server.
  • The server is the component that receives requests and then processes them. A ...

Get Hands-On Full Stack Development with Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.