MCPcopy
hub / github.com/gofiber/fiber / Get

Method Get

req.go:472–474  ·  view source on GitHub ↗

Get returns the HTTP request header specified by field. Field names are case-insensitive Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead.

(key string, defaultValue ...string)

Source from the content-addressed store, hash-verified

470// Returned value is only valid within the handler. Do not store any references.
471// Make copies or use the Immutable setting instead.
472func (r *DefaultReq) Get(key string, defaultValue ...string) string {
473 return GetReqHeader(r.c, key, defaultValue...)
474}
475
476// GetReqHeader returns the HTTP request header specified by filed.
477// This function is generic and can handle different headers type values.

Callers 4

HostMethod · 0.95
extractIPsFromHeaderMethod · 0.95
extractIPFromHeaderMethod · 0.95
RangeMethod · 0.95

Calls 1

GetReqHeaderFunction · 0.85

Tested by

no test coverage detected