Method

Returns a string corresponding to the HTTP method of the request: GET, POST, PUT, and so on.
Optionally, you could override the method by passing a string.

  1. func (c *Ctx) Method(override ...string) string
  1. app.Post("/", func(c *fiber.Ctx) error {
  2. c.Method() // "POST"
  3. c.Method("GET")
  4. c.Method() // GET
  5. // ...
  6. })