@@ -45,9 +45,9 @@ func GetReqHeader[V any](c Ctx, key string, defaultValue ...V) V
4545``` go title="Example"
4646app.Get (" /search" , func (c fiber.Ctx ) error {
4747 // curl -X GET http://example.com/search -H "X-Request-ID: 12345" -H "X-Request-Name: John"
48- GetReqHeader [int ](c, " X-Request-ID" ) // => returns 12345 as integer.
49- GetReqHeader [string ](c, " X-Request-Name" ) // => returns "John" as string.
50- GetReqHeader [string ](c, " unknownParam" , " default" ) // => returns "default" as string.
48+ fiber. GetReqHeader [int ](c, " X-Request-ID" ) // => returns 12345 as integer.
49+ fiber. GetReqHeader [string ](c, " X-Request-Name" ) // => returns "John" as string.
50+ fiber. GetReqHeader [string ](c, " unknownParam" , " default" ) // => returns "default" as string.
5151 // ...
5252})
5353```
@@ -97,8 +97,8 @@ func Params[V any](c Ctx, key string, defaultValue ...V) V
9797``` go title="Example"
9898app.Get (" /user/:user/:id" , func (c fiber.Ctx ) error {
9999 // http://example.com/user/john/25
100- Params [int ](c, " id" ) // => returns 25 as integer.
101- Params [int ](c, " unknownParam" , 99 ) // => returns the default 99 as integer.
100+ fiber. Params [int ](c, " id" ) // => returns 25 as integer.
101+ fiber. Params [int ](c, " unknownParam" , 99 ) // => returns the default 99 as integer.
102102 // ...
103103 return c.SendString (" Hello, " + fiber.Params [string ](c, " user" ))
104104})
@@ -116,9 +116,9 @@ func Query[V any](c Ctx, key string, defaultValue ...V) V
116116``` go title="Example"
117117app.Get (" /search" , func (c fiber.Ctx ) error {
118118 // http://example.com/search?name=john&age=25
119- Query [string ](c, " name" ) // => returns "john"
120- Query [int ](c, " age" ) // => returns 25 as integer.
121- Query [string ](c, " unknownParam" , " default" ) // => returns "default" as string.
119+ fiber. Query [string ](c, " name" ) // => returns "john"
120+ fiber. Query [int ](c, " age" ) // => returns 25 as integer.
121+ fiber. Query [string ](c, " unknownParam" , " default" ) // => returns "default" as string.
122122 // ...
123123})
124124```
0 commit comments