Chapter 4. Processing requests

This chapter covers

  • Using Go requests and responses
  • Processing HTML forms with Go
  • Sending responses back to the client with ResponseWriter
  • Working with cookies
  • Implementing flash messages with cookies

In the previous chapter we explored serving web applications with the built-in net/http library. You also learned about handlers, handler functions, and multiplexers. Now that you know about receiving and handing off the request to the correct set of functions, in this chapter we’ll investigate the tools that Go provides to programmers to process requests and send responses back to the client.

4.1. Requests and responses

In chapter 1 we went through quite a bit of information about HTTP messages. If that ...

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.