MCPcopy
hub / github.com/gofiber/fiber / Add

Method Add

register.go:118–122  ·  view source on GitHub ↗

Add allows you to specify multiple HTTP methods to register a route. The provided handlers are executed in order, starting with `handler` and then the variadic `handlers`.

(methods []string, handler any, handlers ...any)

Source from the content-addressed store, hash-verified

116// Add allows you to specify multiple HTTP methods to register a route.
117// The provided handlers are executed in order, starting with `handler` and then the variadic `handlers`.
118func (r *Registering) Add(methods []string, handler any, handlers ...any) Register {
119 converted := collectHandlers("register", append([]any{handler}, handlers...)...)
120 r.app.register(methods, r.path, r.group, converted...)
121 return r
122}
123
124// RouteChain returns a new Register instance whose route path takes
125// the path in the current instance as its prefix.

Callers 10

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

Calls 2

collectHandlersFunction · 0.85
registerMethod · 0.80

Tested by

no test coverage detected