Status

Sets the HTTP status for the response.

Method is a chainable.
  1. func (c *Ctx) Status(status int) *Ctx
  1. app.Get("/", func(c *fiber.Ctx) error {
  2. c.Status(200)
  3. return nil
  4. return c.Status(400).Send("Bad Request")
  5. return c.Status(404).SendFile("./public/gopher.png")
  6. })