MCPcopy
hub / github.com/gin-gonic/gin / NoMethod

Method NoMethod

gin.go:332–335  ·  view source on GitHub ↗

NoMethod sets the handlers called when Engine.HandleMethodNotAllowed = true.

(handlers ...HandlerFunc)

Source from the content-addressed store, hash-verified

330
331// NoMethod sets the handlers called when Engine.HandleMethodNotAllowed = true.
332func (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...

Callers 9

TestMiddlewareNoRouteFunction · 0.80
NoMethodFunction · 0.80

Calls 1

rebuild405HandlersMethod · 0.95