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)
| 181 | // |
| 182 | // CookieJar stores copies of the provided cookies, so they may be safely released after use. |
| 183 | func (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. |