Get
Returns the HTTP request header specified by the field.
The match is case-insensitive.
func (c *Ctx) Get(key string, defaultValue ...string) string
app.Get("/", func(c *fiber.Ctx) error {
c.Get("Content-Type") // "text/plain"
c.Get("CoNtEnT-TypE") // "text/plain"
c.Get("something", "john") // "john"
// ..
})
Returned value is only valid within the handler. Do not store any references.
Make copies or use theImmutable
setting instead. Read more…