Path

Contains the path part of the request URL. Optionally, you could override the path by passing a string.

  1. func (c *Ctx) Path(override ...string) string
  1. // GET http://example.com/users?sort=desc
  2. app.Get("/users", func(c *fiber.Ctx) error {
  3. c.Path() // "/users"
  4. c.Path("/john")
  5. c.Path() // "/john"
  6. // ...
  7. })