Use adds middleware to the chain which is run after router has found matching route and before route/request handler method is executed.
(middleware ...MiddlewareFunc)
| 487 | |
| 488 | // Use adds middleware to the chain which is run after router has found matching route and before route/request handler method is executed. |
| 489 | func (e *Echo) Use(middleware ...MiddlewareFunc) { |
| 490 | e.middleware = append(e.middleware, middleware...) |
| 491 | e.buildRouterChains() |
| 492 | } |
| 493 | |
| 494 | // CONNECT registers a new CONNECT route for a path with matching handler in the |
| 495 | // router with optional route-level middleware. Panics on error. |