Set

Sets the response’s HTTP header field to the specified key, value.

  1. func (c *Ctx) Set(key string, val string)
  1. app.Get("/", func(c *fiber.Ctx) error {
  2. c.Set("Content-Type", "text/plain")
  3. // => "Content-type: text/plain"
  4. // ...
  5. })