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

Method Handle

core/router/api_container.go:181–186  ·  view source on GitHub ↗

Handle same as `Self.Handle` but it accepts one or more "handlersFn" functions which each one of them can accept any input arguments that match with the Party's registered Container's `Dependencies` and any output result; like custom structs , string, []byte, int, error, a combination of the abov

(method, relativePath string, handlersFn ...interface{})

Source from the content-addressed store, hash-verified

179//
180// See `OnError`, `RegisterDependency`, `Use`, `Done`, `Get`, `Post`, `Put`, `Patch` and `Delete` too.
181func (api *APIContainer) Handle(method, relativePath string, handlersFn ...interface{}) *Route {
182 handlers := api.convertHandlerFuncs(relativePath, handlersFn...)
183 route := api.Self.Handle(method, relativePath, handlers...)
184 fixRouteInfo(route, handlersFn)
185 return route
186}
187
188// Get registers a route for the Get HTTP Method.
189//

Callers 9

GetMethod · 0.95
PostMethod · 0.95
PutMethod · 0.95
DeleteMethod · 0.95
ConnectMethod · 0.95
HeadMethod · 0.95
OptionsMethod · 0.95
PatchMethod · 0.95
TraceMethod · 0.95

Calls 3

convertHandlerFuncsMethod · 0.95
fixRouteInfoFunction · 0.85
HandleMethod · 0.65

Tested by

no test coverage detected