MCPcopy Create free account
hub / github.com/kataras/iris / Handle

Method Handle

mvc/controller.go:440–447  ·  view source on GitHub ↗

Handle registers a route based on a http method, the route's path and a function name that belongs to the controller, it accepts a forth, optionally, variadic parameter which is the before handlers. Just like `Party#Handle`, it returns the `*router.Route`, if failed then it logs the errors and it r

(method, path, funcName string, middleware ...context.Handler)

Source from the content-addressed store, hash-verified

438//
439// Handle will add a route to the "funcName".
440func (c *ControllerActivator) Handle(method, path, funcName string, middleware ...context.Handler) *router.Route {
441 routes := c.handleMany(method, path, funcName, false, middleware...)
442 if len(routes) == 0 {
443 return nil
444 }
445
446 return routes[0]
447}
448
449// handleHTTPError is called when a controller's method
450// with the "HandleHTTPError" is found. That method

Callers 1

parseMethodMethod · 0.95

Calls 1

handleManyMethod · 0.95

Tested by

no test coverage detected