MCPcopy
hub / github.com/go-chi/chi / MethodNotAllowedHandler

Method MethodNotAllowedHandler

mux.go:407–412  ·  view source on GitHub ↗

MethodNotAllowedHandler returns the default Mux 405 responder whenever a method cannot be resolved for a route.

(methodsAllowed ...methodTyp)

Source from the content-addressed store, hash-verified

405// MethodNotAllowedHandler returns the default Mux 405 responder whenever
406// a method cannot be resolved for a route.
407func (mx *Mux) MethodNotAllowedHandler(methodsAllowed ...methodTyp) http.HandlerFunc {
408 if mx.methodNotAllowedHandler != nil {
409 return mx.methodNotAllowedHandler
410 }
411 return methodNotAllowedHandler(methodsAllowed...)
412}
413
414// handle registers a http.Handler in the routing tree for a particular http method
415// and routing pattern.

Callers 1

routeHTTPMethod · 0.95

Calls 1

methodNotAllowedHandlerFunction · 0.85

Tested by

no test coverage detected