📚 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 too
pull/2707/head
Moritz 2023-11-01 21:42:57 +01:00 committed by GitHub
parent 0104e59e9f
commit fe395b9850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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