File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 24
24
<a href =" https://github.com/gofiber/fiber/blob/master/.github/README_de.md " >
25
25
<img height="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/de.svg">
26
26
</a >
27
+ <a href =" https://github.com/gofiber/fiber/blob/master/.github/README_nl.md " >
28
+ <img height="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/nl.svg">
29
+ </a >
27
30
<a href =" https://github.com/gofiber/fiber/blob/master/.github/README_ko.md " >
28
31
<img height="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/ko.svg">
29
32
</a >
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ func (ctx *Ctx) Body(key ...string) string {
248
248
}
249
249
// Return post value by key
250
250
if len (key ) > 0 {
251
+ fmt .Println ("DEPRECATED: c.Body(\" " + key [0 ] + "\" ) is deprecated, please use c.FormValue(\" " + key [0 ] + "\" ) instead." )
251
252
return getString (ctx .Fasthttp .Request .PostArgs ().Peek (key [0 ]))
252
253
}
253
254
return ""
@@ -283,7 +284,7 @@ func (ctx *Ctx) BodyParser(out interface{}) error {
283
284
}
284
285
return schemaDecoderForm .Decode (out , data .Value )
285
286
}
286
- // query Params
287
+ // query params
287
288
if ctx .Fasthttp .QueryArgs ().Len () > 0 {
288
289
data := make (map [string ][]string )
289
290
ctx .Fasthttp .QueryArgs ().VisitAll (func (key []byte , val []byte ) {
@@ -342,6 +343,7 @@ func (ctx *Ctx) Cookie(cookie *Cookie) {
342
343
// Cookies is used for getting a cookie value by key
343
344
func (ctx * Ctx ) Cookies (key ... string ) (value string ) {
344
345
if len (key ) == 0 {
346
+ fmt .Println ("DEPRECATED: c.Cookies() without a key is deprecated, please use c.Get(\" Cookies\" ) to get the cookie header instead." )
345
347
return ctx .Get (HeaderCookie )
346
348
}
347
349
return getString (ctx .Fasthttp .Request .Header .Cookie (key [0 ]))
You can’t perform that action at this time.
0 commit comments