mirror of https://github.com/gofiber/fiber.git
📚 Doc: Add additional information as to why GetReqHeaders returns a map where the values are slices of strings (#2698)
* Update ctx.md Added additional information to why GetReqHeaders returns a map where the values are slices of strings (instead of a single string as one might expect) * Update ctx.md added the same explanation to GetRespHeaders toopull/2707/head
parent
0104e59e9f
commit
fe395b9850
|
@ -583,7 +583,7 @@ app.Get("/", func(c *fiber.Ctx) error {
|
|||
|
||||
## GetReqHeaders
|
||||
|
||||
Returns the HTTP request headers.
|
||||
Returns the HTTP request headers as a map. Since a header can be set multiple times in a single request, the values of the map are slices of strings containing all the different values of the header.
|
||||
|
||||
```go title="Signature"
|
||||
func (c *Ctx) GetReqHeaders() map[string][]string
|
||||
|
@ -618,7 +618,7 @@ app.Get("/", func(c *fiber.Ctx) error {
|
|||
|
||||
## GetRespHeaders
|
||||
|
||||
Returns the HTTP response headers.
|
||||
Returns the HTTP response headers as a map. Since a header can be set multiple times in a single request, the values of the map are slices of strings containing all the different values of the header.
|
||||
|
||||
```go title="Signature"
|
||||
func (c *Ctx) GetRespHeaders() map[string][]string
|
||||
|
|
Loading…
Reference in New Issue