Skip to content

Commit

Permalink
📚 Doc: Add additional information as to why GetReqHeaders returns a m…
Browse files Browse the repository at this point in the history
…ap where the values are slices of strings (gofiber#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
  • Loading branch information
moritz157 committed Nov 1, 2023
1 parent 0104e59 commit fe395b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/ctx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fe395b9

Please sign in to comment.