SendStatus
Sets the status code and the correct status message in the body, if the response body is empty.
You can find all used status codes and messages here.
func (c *Ctx) SendStatus(status int) error
app.Get("/not-found", func(c *fiber.Ctx) error {
return c.SendStatus(415)
// => 415 "Unsupported Media Type"
c.SendString("Hello, World!")
return c.SendStatus(415)
// => 415 "Hello, World!"
})