Get

Returns the HTTP request header specified by the field.

The match is case-insensitive.
  1. func (c *Ctx) Get(key string, defaultValue ...string) string
  1. app.Get("/", func(c *fiber.Ctx) error {
  2. c.Get("Content-Type") // "text/plain"
  3. c.Get("CoNtEnT-TypE") // "text/plain"
  4. c.Get("something", "john") // "john"
  5. // ..
  6. })

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more…