Chapter 3. Handling requests

This chapter covers

  • Using the Go net/http library
  • Serving out HTTP using the Go net/http library
  • Understanding handlers and handler functions
  • Working with multiplexers

Chapter 2 showed the steps for creating a simple internet forum web application. The chapter mapped out the various parts of a Go web application, and you saw the big picture of how a Go web application is structured. But there’s little depth in each of those parts. In the next few chapters, we’ll delve into the details of each of these parts and explore in depth how they can be put together.

In this and the next chapter, we’ll focus on the brains of the web application: the handlers that receive and process requests from the client. In this ...

Get Go Web Programming 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.