Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CURL.SetOptionCookieList

Sets the cookie string.

Component Version macOS Windows Linux Server iOS SDK
CURL 2.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionCookieList"; curl; Value { ; Encoding } )   More

Parameters

Parameter Description Example Flags
curl The CURL session handle. $curl
Value The cookie string. "Set-Cookie: value = ..."
Encoding The text encoding for text parameter.
Default is UTF-8.
Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ.
"UTF8" Optional

Result

Returns "OK" on success.

Description

Sets the cookie string.
Cookie can be either in Netscape / Mozilla format or just regular HTTP-style header (Set-Cookie: ...) format. If cURL cookie engine was not enabled it will enable its cookie engine. Passing a magic string "ALL" will erase all cookies known by cURL. Passing the special string "SESS" will only erase all session cookies known by cURL. Passing the special string "FLUSH" will write all cookies known by cURL to the file specified by CURL.SetOptionCookieJar.

See also COOKIELIST option in CURL manual.

See also

Created 18th August 2014, last changed 5th July 2015


CURL.SetOptionCookieJar - CURL.SetOptionCookieSession