// Handle registers a handler for the given method and path.
540232
func (h *Hitch) Handle(method, path string, handler http.Handler, middleware ...func(http.Handler) http.Handler) {
	for i := len(middleware) - 1; i >= 0; i-- {
		handler = middleware[i](handler)
	}
	h.Router.Handle(method, path, wrap(handler))
}
197396
func (hdr *Handler) Handle(im *imageserver.Image, params imageserver.Params) (*imageserver.Image, error) {
	enc, format, err := getEncoderFormat(im.Format, params)
	if err != nil {
		if _, ok := err.(*imageserver.ParamError); !ok {
			err = &imageserver.ImageError{Message: err.Error()}
		}
		return nil, err
	}
	if !hdr.change(im, format, enc, params) {
		return im, nil
	}
	nim, err := Decode(im)
	if err != nil {
		return nil, err
	}
	if hdr.Processor != nil {
		nim, err = hdr.Processor.Process(nim, params)
		if err != nil {
			return nil, err
		}
	}
	im, err = encode(nim, format, enc, params)
	if err != nil {
		return nil, err
	}
	return im, nil
}
1164425
func (fn PetCreateHandlerFunc) Handle(params PetCreateParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
89344
func (r *Router) Handle(method, path string, mc MiddlewareChain, h Handler) {
	p := makeBasePath(r.BasePath, path)
	handle := r.adapt(mc, h, p)
	r.hrouter.Handle(method, p, handle)
}
1118827
func (h *Handler) Handle(err error) {
	// Expose the stackTracer interface on the outer error (if there is stack trace in the error)
	// Convert error with stack trace to an internal error type
	if e, ok := emperror.ExposeStackTrace(err).(stackTracer); ok {
		err = newErrorWithStackFrames(e)
	}

	var rawData []interface{}

	if cause := errors.Cause(err); cause != nil {
		if name := reflect.TypeOf(cause).String(); len(name) > 0 {
			errorClass := bugsnag.ErrorClass{Name: name}

			rawData = append(rawData, errorClass)
		}
	}

	if ctx := emperror.Context(err); len(ctx) > 0 {
		rawData = append(rawData, bugsnag.MetaData{
			"Params": keyvals.ToMap(ctx),
		})
	}

	_ = h.notifier.Notify(err, rawData...)
}
268909
func (fn AddPetHandlerFunc) Handle(params AddPetParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
248818
func (f HandlerFunc) Handle(w http.ResponseWriter, r *http.Request) error {
	w.Header().Set("Content-Type", "application/json")
	return f(w, r)
}
1114408
func (h lspHandler) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) {
	if isFileSystemRequest(req.Method) {
		h.Handler.Handle(ctx, conn, req)
		return
	}
	go h.Handler.Handle(ctx, conn, req)
}
679580
func (r *Router) Handler(req *http.Request) (route *Route, h Handler, vars map[string]string) {
	var match mux.RouteMatch

	if r.mux.Match(req, &match) {
		route = r.getOrCreateRoute(match.Route, "")
		h = match.Handler.(Handler)
		vars = match.Vars
		return
	}

	if r.NotFoundHandler == nil {
		h = HandlerFunc(NotFound)
		return
	}

	h = r.NotFoundHandler
	return
}
1230227
func (r *Router) Handle(path string, handler http.Handler) *Route {
	return r.NewRoute().Path(path).Handler(handler)
}
52269
func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) {
	s.handlers[meth] = append(s.handlers[meth], handler{pat: pat, h: h})
}
1013392
func (r *Router) handle(handlerName string, h http.HandlerFunc) httprouter.Handle {
	if r.instrh != nil {
		// This needs to be outside the closure to avoid data race when reading and writing to 'h'.
		h = r.instrh(handlerName, h)
	}
	return func(w http.ResponseWriter, req *http.Request, params httprouter.Params) {
		ctx, cancel := context.WithCancel(req.Context())
		defer cancel()

		for _, p := range params {
			ctx = context.WithValue(ctx, param(p.Key), p.Value)
		}
		h(w, req.WithContext(ctx))
	}
}
671888
func (s *Server) Handle(h Handler) {
	if s.Handler != nil {
		panic("LDAP: multiple Handler registrations")
	}
	s.Handler = h
}
333766
func Handle(httpMethod, relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes {
	return engine().Handle(httpMethod, relativePath, handlers...)
}
545960
func (m *mux) Handle(method, path string, handle MuxHandler) {
	hthandle := func(rw http.ResponseWriter, req *http.Request, htparams map[string]string) {
		params := req.URL.Query()
		for n, p := range htparams {
			params.Set(n, p)
		}
		handle(rw, req, params)
	}
	m.handles[method+path] = handle
	m.router.Handle(method, path, hthandle)
}
1070006
func (r *Router) Handle(method, pattern string, handler http.Handler) Route {
	var p string
	if pattern == "/" && r.pattern != "" {
		p = r.pattern
	} else {
		p = r.pattern + pattern
	}

	built := r.buildMiddlewares(handler)

	rm := r.root().hostrm.Register(r.host)
	rt := rm.Register(method, p, built)

	// If this route does not exist in this Router instance then add it
	if _, ok := r.findRoute(rt); !ok {
		rt.pattern = p
		rt.host = r.host
		rt.pathMatcher = rm
		r.routes = append(r.routes, rt)
	}
	return rt
}
1191413
func (h HandlerFunc) Handle(ctx *Context, res *http.Response, err error) {
	h(ctx, res, err)
}