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.
func (c *Ctx) Method(override ...string) string
app.Post("/", func(c *fiber.Ctx) error {
c.Method() // "POST"
c.Method("GET")
c.Method() // GET
// ...
})