HTTP Middleware
Shiju Varghese · Apress eBooks · 2015
The last two chapters explored various aspects of building web applications and web APIs. This chapter takes a look at HTTP middleware, which simplifies development efforts when real-world web applications are built. The Go developer community has not been too interested in adopting full-fledged web application frameworks for building web applications. Instead, they prefer to use standard library packages such as the fundamental block, along with a few essential third-party libraries such as Gorilla mux . Writing and using HTTP middleware is an essential approach for staying with this strategy. You can implement many cross-cutting behaviors such as security, HTTP request and response logging, compressing HTTP responses, and caching as middleware components; and these middleware components can be applied to many application handlers or across-the-application handlers. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.