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:
parent
ba772356db
commit
6e2dbc50f7
1
ctx.go
1
ctx.go
@ -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]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user