// Rest registers the given handler on all methods without a handler.
502528
func (r *Route) Rest(fn http.HandlerFunc) *Route {
	for _, method := range methodNames {
		if len(r.methods[method]) > 0 {
			continue
		}

		r.addMethodHandlerFunc(method, fn)
	}

	return r
}
1107325
func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	h.serveHTTPForOp(w, r, OpAll)
}
65804
func (g *routeGroup) Handle(method string, path string, h http.HandlerFunc) {
	g.handle(method, path, h)
}
1279138
func (r *Router) Post(path string, handler HandlerFunc) {
	r.Add(POST, path, handler)
}
45904
func (s *Server) Handle(route string, method string, httpHandler http.Handler) {
	s.addRoute(route, method, httpHandler)
}
747309
func (this *Server) All(path string, fn ...func(*Request, *Response, func())) {
	for _, verb := range httphelp.Methods {
		this.Verb(verb, path, fn...)
	}
}
1226175
func (engine *Engine) NoMethod(handlers ...HandlerFunc) {
	engine.noMethod = handlers
	engine.rebuild405Handlers()
}
984302
func (app *App) JSON(route string, handler interface{}) *App {
	h := app.defaultRouter.determineHandler(handler)
	app.defaultRouter.Handle(MethodGET, route, jsonHandler(h))

	return app
}
924611
func (r *Route) Post(fn http.HandlerFunc) *Route {
	return r.Method(http.MethodPost, fn)
}
254732
func (c *managedHandleImpl) Handle() (interface{}, error) {
	if atomic.LoadInt32(&c.isActive) == 0 {
		return c.handle, errors.New("Resource handle is no longer valid")
	}
	return c.handle, nil
}
1189736
func (r *Route) All(fn http.HandlerFunc) *Route {
	for _, method := range methodNames {
		r.addMethodHandlerFunc(method, fn)
	}
	return r
}
1214716
func (r *Request) verb(method string) *Request {
	r.method = method
	return r
}
1197925
func (m *Mux) Handler(method, path string, handler HandlerFunc) Handler {
	return Handler{
		Method: method,
		Path:   path,
		Func:   handler,
	}
}
1134682
func HTTPHandler(opts ...HandlerOption) Handler {
	h := &httpHandler{}
	h.Init(opts...)
	return h
}
1302583
func (m *Middleware) Handler(h http.Handler, component string) *Handler {
	return &Handler{
		m:         m,
		handler:   h,
		component: component,
	}
}
152374
func (r *Router) Method(method, path string, fn http.HandlerFunc) *Router {
	r.Route(path).Method(method, fn)
	return r
}
707504
func (r *Router) Handler(method string, path string, handler http.Handler) {
	r.Router.Handler(method, path, handler)
}