CURLOPT_COOKIELIST (3) - Linux Man Pages
CURLOPT_COOKIELIST: add to or manipulate cookies held in memory
NAMECURLOPT_COOKIELIST - add to or manipulate cookies held in memory
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIELIST, char *cookie);
DESCRIPTIONPass a char * to 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.
Additionally, there are commands available that perform actions if you pass in these exact strings:
erases all cookies held in memory
erases all session cookies held in memory
writes all known cookies to the file specified by CURLOPT_COOKIEJAR(3)
loads all cookies from the files specified by CURLOPT_COOKIEFILE(3)
AVAILABILITYALL was added in 7.14.1
SESS was added in 7.15.4
FLUSH was added in 7.17.1