cURL / Mailing Lists / curl-library / Single Mail


getting/setting cookies

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


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

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 -- --
       Dedicated custom curl help for hire:
Received on 2004-12-17