Route

Returns the matched Route struct.

  1. func (c *Ctx) Route() *Route
  1. // http://localhost:8080/hello
  2. app.Get("/hello/:name", func(c *fiber.Ctx) error {
  3. r := c.Route()
  4. fmt.Println(r.Method, r.Path, r.Params, r.Handlers)
  5. // GET /hello/:name handler [name]
  6. // ...
  7. })