cURL / Mailing Lists / curl-library / Single Mail

curl-library

getting/setting cookies

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 17 Dec 2004 11:22:20 +0100 (CET)

Hi

I have this suggestion on a simple get/set cookies interface for addition to
libcurl:

curl_easy_getinfo() - CURLINFO_COOKIELIST to get a curl_slist with all known
cookies (netscape/mozilla cookie file formatted)

curl_easy_setopt() - CURLOPT_COOKIELIST to set a list of cookies (using the
same format as above or HTTP-header style - both are supported)

To remove a cookie that libcurl already knows about, you simply set it with no
contents, or you set it with an expired time.

I'm not sure how to clear all known cookies easily, or even if that is a
desired feature.

Opinions? Thoughts? Other ideas?

This is much simpler than our previous cookie API discussions, but I think
simplicity is to prefer here.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-12-17