File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 2424 <a href =" https://github.com/gofiber/fiber/blob/master/.github/README_de.md " >
2525 <img height="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/de.svg">
2626 </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 >
2730 <a href =" https://github.com/gofiber/fiber/blob/master/.github/README_ko.md " >
2831 <img height="20px" src="https://github.com/gofiber/docs/blob/master/static/flags/ko.svg">
2932 </a >
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ func (ctx *Ctx) Body(key ...string) string {
248248 }
249249 // Return post value by key
250250 if len (key ) > 0 {
251+ fmt .Println ("DEPRECATED: c.Body(\" " + key [0 ] + "\" ) is deprecated, please use c.FormValue(\" " + key [0 ] + "\" ) instead." )
251252 return getString (ctx .Fasthttp .Request .PostArgs ().Peek (key [0 ]))
252253 }
253254 return ""
@@ -283,7 +284,7 @@ func (ctx *Ctx) BodyParser(out interface{}) error {
283284 }
284285 return schemaDecoderForm .Decode (out , data .Value )
285286 }
286- // query Params
287+ // query params
287288 if ctx .Fasthttp .QueryArgs ().Len () > 0 {
288289 data := make (map [string ][]string )
289290 ctx .Fasthttp .QueryArgs ().VisitAll (func (key []byte , val []byte ) {
@@ -342,6 +343,7 @@ func (ctx *Ctx) Cookie(cookie *Cookie) {
342343// Cookies is used for getting a cookie value by key
343344func (ctx * Ctx ) Cookies (key ... string ) (value string ) {
344345 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." )
345347 return ctx .Get (HeaderCookie )
346348 }
347349 return getString (ctx .Fasthttp .Request .Header .Cookie (key [0 ]))
You can’t perform that action at this time.
0 commit comments