MethodNotAllowedHandler returns the default Mux 405 responder whenever a method cannot be resolved for a route.
(methodsAllowed ...methodTyp)
| 405 | // MethodNotAllowedHandler returns the default Mux 405 responder whenever |
| 406 | // a method cannot be resolved for a route. |
| 407 | func (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. |
no test coverage detected