if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
- /* enable the cookie engine with a non-existing file */
- curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "-");
+ /* enable the cookie engine */
+ curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
res = curl_easy_perform(curl);
/* a linked list of cookies in cookie file format */
struct curl_slist *each = cookies;
while(each) {
- printf("%s", each->data);
+ printf("%s\\n", each->data);
each = each->next;
}
/* we must free these cookies when we're done */