1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-22 23:24:32 +00:00

Update ctx.go

This commit is contained in:
Fenny 2020-04-24 00:45:02 +02:00
parent ba772356db
commit 6e2dbc50f7

1
ctx.go
View File

@ -342,6 +342,7 @@ func (ctx *Ctx) Cookie(cookie *Cookie) {
// Cookies is used for getting a cookie value by key
func (ctx *Ctx) Cookies(key ...string) (value string) {
if len(key) == 0 {
fmt.Println("Deprecation Warning: c.Cookies() without an key is deprecated since v1.9.2, please use c.Get(\"Cookies\") instead to get the raw cookie header.")
return ctx.Get(HeaderCookie)
}
return getString(ctx.Fasthttp.Request.Header.Cookie(key[0]))