curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Get cookies for specific URL

From: Hölzl, Dominik via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 24 Sep 2019 14:14:07 +0000

Hello!

Is there an equivalent for the WinAPI-method InternetGetCookieEx / macOS API method NSHTTPCookieStorage/cookiesForURL in cURL to get all cookies for a specific URL?
I know there is CURLINFO_COOKIELIST but this seems to output all cookies, regardless of URL / domain / path / time validity etc.

In cookie.c I found the internal method Curl_cookie_getlist which seems to do what I would need, but that isn't exposed.

CURLINFO_COOKIELIST/Curl_cookie_list skips cookies without domain property as stated in the docs, so this may be a difference when using CURLINFO_COOKIELIST and doing the matching to the given URL like Curl_cookie_getlist externally?

I am using CURLOPT_SHARE for the cookie store.

Any ideas?

Thank you and regards,
Dominik

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-09-24