function AddFromFile(const filename:ansistring):CurlCode; __________________________________________________________ Appends a list of cookies from a file, which can be either in Netscape/Mozilla format or just regular HTTP-style headers dumped to a file. Returns CURLE_OK on success, or CURLE_READ_ERROR on failure. |
function SaveToFile(const filename:ansistring):CurlCode; _________________________________________________________ Saves all currently known cookies to a file. Returns CURLE_OK on success, or CURLE_WRITE_ERROR on failure. |
function Add(const cookie:ansistring):boolean; _______________________________________________ Appends a single cookie, which can be either in Netscape/Mozilla format or just a regular http-style "Set-Cookie:" header. |
procedure ForEachCookie(callback:tCurlEnumCookiesFunction; user_data:pointer); _______________________________________________________________________________ Iterates through the cookie list, calling your callback once for each cookie. The callback parameter should be a pointer to a function that matches the prototype: type tCurlEnumCookiesFunction = function(Sender:tObject; const Cookie:ansistring; UserData:pointer):boolean; The arguments passed to your callback are as follows: Sender: the CookieList object. Cookie: the curent cookie string. UserData: user-defined pointer, specified in the user_data argument of ForEachCookie Your callback should return TRUE to continue iteration, or FALSE to cancel. NOTE: You can also accomplish the same thing directly from the parent tCurl component, using the ListCookies procedure and the OnListCookies event handler. |
procedure Clear; _________________ Clears the list of all cookies. |