Peteris Krumins added CURLOPT_COOKIELIST and CURLINFO_COOKIELIST, which is a
simple interface to extracting and setting cookies in libcurl's internal "cookie jar". See the new cookie_interface.c example code.
This commit is contained in:
@@ -134,6 +134,13 @@ counted). Combined with \fICURLINFO_REDIRECT_COUNT\fP you are able to know
|
||||
how many times libcurl successfully reused existing connection(s) or not. See
|
||||
the Connection Options of \fIcurl_easy_setopt(3)\fP to see how libcurl tries
|
||||
to make persistent connections to save time. (Added in 7.12.3)
|
||||
.IP CURLINFO_COOKIELIST
|
||||
Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all
|
||||
cookies cURL knows (expired ones, too). Don't forget to
|
||||
\fIcurl_slist_free_all(3)\fP the list after it has been used.
|
||||
If there are no cookies (cookies for the handle have not been enabled or
|
||||
simply none have been received) 'struct curl_slist *' will be set to
|
||||
point to NULL.
|
||||
.SH RETURN VALUE
|
||||
If the operation was successful, CURLE_OK is returned. Otherwise an
|
||||
appropriate error code will be returned.
|
||||
|
@@ -654,6 +654,12 @@ cookies" from the previous session. By default, libcurl always stores and
|
||||
loads all cookies, independent if they are session cookies are not. Session
|
||||
cookies are cookies without expiry date and they are meant to be alive and
|
||||
existing for this "session" only.
|
||||
.IP CURLOPT_COOKIELIST
|
||||
Pass a char * to a cookie string. Cookie can be either in Netscape / Mozilla
|
||||
format or just regular HTTP-style header (Set-Cookie: ...) format. The passed
|
||||
string will get modified so make sure it's writable. If cURL cookie engine
|
||||
was not enabled it will enable its cookie engine. Passing a magic string
|
||||
\&"ALL" will erase all cookies known by cURL.
|
||||
.IP CURLOPT_HTTPGET
|
||||
Pass a long. If the long is non-zero, this forces the HTTP request to get back
|
||||
to GET. usable if a POST, HEAD, PUT or a custom request have been used
|
||||
|
Reference in New Issue
Block a user