NoMethod sets the handlers called when Engine.HandleMethodNotAllowed = true.
(handlers ...HandlerFunc)
| 330 | |
| 331 | // NoMethod sets the handlers called when Engine.HandleMethodNotAllowed = true. |
| 332 | func (engine *Engine) NoMethod(handlers ...HandlerFunc) { |
| 333 | engine.noMethod = handlers |
| 334 | engine.rebuild405Handlers() |
| 335 | } |
| 336 | |
| 337 | // Use attaches a global middleware to the router. i.e. the middleware attached through Use() will be |
| 338 | // included in the handlers chain for every single request. Even 404, 405, static files... |