Name
easy:SetOpt_CookieList -- add to or manipulate cookies held in memory
Synopsis
easy:SetOpt_CookieList(cookie)
Function
Pass a cookie string.

Such a cookie can be either a single line in Netscape / Mozilla format or just regular HTTP-style header (Set-Cookie: ...) format. This will also enable the cookie engine. This adds that single cookie to the internal cookie store.

Exercise caution if you are using this option and multiple transfers may occur. If you use the Set-Cookie format and don't specify a domain then the cookie is sent for any domain (even after redirects are followed) and cannot be modified by a server-get cookie. If a server sets a cookie of the same name (or maybe you've imported one) then both will be sent on a future transfer to that server, likely not what you intended. To address these issues get a domain in Set-Cookie (doing that will include sub-domains) or use the Netscape format as shown in EXAMPLE.

Additionally, there are commands available that perform actions if you pass in these exact strings:

ALL
erases all cookies held in memory

SESS
erases all session cookies held in memory

FLUSH
writes all known cookies to the file specified by #CURLOPT_COOKIEJAR

RELOAD
loads all cookies from the files specified by #CURLOPT_COOKIEFILE

Inputs
cookie
input value

Show TOC