Skip to main content

HTTP Middleware

  • Chapter

Abstract

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Shiju Varghese

About this chapter

Cite this chapter

Varghese, S. (2015). HTTP Middleware. In: Web Development with Go. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1052-9_6

Download citation

Publish with us

Policies and ethics