Status
Sets the HTTP status for the response.
Method is a chainable.
func (c *Ctx) Status(status int) *Ctx
app.Get("/fiber", func(c *fiber.Ctx) error {
c.Status(200)
return nil
}
app.Get("/hello", func(c *fiber.Ctx) error {
return c.Status(400).SendString("Bad Request")
}
app.Get("/world", func(c *fiber.Ctx) error {
return c.Status(404).SendFile("./public/gopher.png")
})