Search code examples
libcurl

How do i get cookies from libcurl?


I visit 4pages. Each page set cookies. How do i ask libcurl for either all cookies or the value of a specific cookie like "session_id"?


Solution

  • curl_easy_getinfo() with the CURLINFO_COOKIELIST option is perfect for this: