MCPcopy
hub / github.com/gofiber/fiber / Set

Method Set

client/cookiejar.go:183–188  ·  view source on GitHub ↗

Set stores the given cookies for the specified URI host. If a cookie key already exists, it will be replaced by the new cookie value. CookieJar stores copies of the provided cookies, so they may be safely released after use.

(uri *fasthttp.URI, cookies ...*fasthttp.Cookie)

Source from the content-addressed store, hash-verified

181//
182// CookieJar stores copies of the provided cookies, so they may be safely released after use.
183func (cj *CookieJar) Set(uri *fasthttp.URI, cookies ...*fasthttp.Cookie) {
184 if uri == nil {
185 return
186 }
187 cj.SetByHost(uri.Host(), cookies...)
188}
189
190// SetByHost stores the given cookies for the specified host. If a cookie key already exists,
191// it will be replaced by the new cookie value.

Calls 2

SetByHostMethod · 0.95
HostMethod · 0.65