Sortix 1.1dev ports manual
This manual documents Sortix 1.1dev ports. You can instead view this document in the latest official manual.
CURLOPT_COOKIEJAR(3) | curl_easy_setopt options | CURLOPT_COOKIEJAR(3) |
NAME
CURLOPT_COOKIEJAR - file name to store cookies toSYNOPSIS
#include <curl/curl.h>DESCRIPTION
Pass a filename as char *, zero terminated. This will make libcurl write all internally known cookies to the specified file when curl_easy_cleanup(3) is called. If no cookies are known, no file will be created. Specify "-" as filename to instead have the cookies written to stdout. Using this option also enables cookies for this session, so if you for example follow a location it will make matching cookies get sent accordingly.DEFAULT
NULLPROTOCOLS
HTTPEXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); /* export cookies to this file when closing the handle */ curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "/tmp/cookies.txt"); ret = curl_easy_perform(curl); /* close the handle, write the cookies! */ curl_easy_cleanup(curl); }
AVAILABILITY
Along with HTTPRETURN VALUE
Returns CURLE_OK if HTTP is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.SEE ALSO
CURLOPT_COOKIEFILE(3), CURLOPT_COOKIE(3), CURLOPT_COOKIELIST(3),May 5, 2017 | libcurl 7.69.0 |