Lines Matching refs:curl
12 * are also available at https://curl.se/docs/copyright.html.
21 * SPDX-License-Identifier: curl
35 #include <curl/curl.h>
38 print_cookies(CURL *curl)
45 printf("Cookies, curl knows:\n");
46 res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
68 CURL *curl;
72 curl = curl_easy_init();
73 if(curl) {
76 curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
77 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
78 curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */
79 res = curl_easy_perform(curl);
85 print_cookies(curl);
87 printf("Erasing curl's knowledge of cookies!\n");
88 curl_easy_setopt(curl, CURLOPT_COOKIELIST, "ALL");
90 print_cookies(curl);
102 res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
118 res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
125 print_cookies(curl);
127 res = curl_easy_perform(curl);
133 curl_easy_cleanup(curl);