#Middleware
3 articles
08 Create Middleware Router
Understanding Middleware
HttpRouter is a library for creating an http router, it doesn’t have any other features apart from a router and this router is an implementation of the default http.Handler
from Golang itself so that to create middleware we can create it ourselves as we have created in the previous Golang Web post, namely
HTTP Middleware.
20 How to Understanding Routing Library in Golang
Routing Library
Golang actually provides ServeMux
as a handler that can handle several endpoints or the term is routing
. But most Golang programmers will usually use libraries to do this routing because ServeMux
does not have advanced features such as path variables, auto binding parameters and middleware. So there are many other alternatives that we can use for routing libraries besides ServeMux
.
19 How to Understanding HTTP Middleware in Golang
Middleware
In web creation, we often hear the concept of middleware or filter or interceptor which is a feature that we can add code to before and after a handler is executed.