Lines Matching full:curl
12 * are also available at https://curl.haxx.se/docs/copyright.html.
33 #include <curl/curl.h>
36 print_cookies(CURL *curl) in print_cookies() argument
43 printf("Cookies, curl knows:\n"); in print_cookies()
44 res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies); in print_cookies()
46 fprintf(stderr, "Curl curl_easy_getinfo failed: %s\n", in print_cookies()
65 CURL *curl; in main() local
69 curl = curl_easy_init(); in main()
70 if(curl) { in main()
73 curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/"); in main()
74 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in main()
75 curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */ in main()
76 res = curl_easy_perform(curl); in main()
78 fprintf(stderr, "Curl perform failed: %s\n", curl_easy_strerror(res)); in main()
82 print_cookies(curl); in main()
84 printf("Erasing curl's knowledge of cookies!\n"); in main()
85 curl_easy_setopt(curl, CURLOPT_COOKIELIST, "ALL"); in main()
87 print_cookies(curl); in main()
99 res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline); in main()
101 fprintf(stderr, "Curl curl_easy_setopt failed: %s\n", in main()
115 res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline); in main()
117 fprintf(stderr, "Curl curl_easy_setopt failed: %s\n", in main()
122 print_cookies(curl); in main()
124 res = curl_easy_perform(curl); in main()
126 fprintf(stderr, "Curl perform failed: %s\n", curl_easy_strerror(res)); in main()
130 curl_easy_cleanup(curl); in main()
133 fprintf(stderr, "Curl init failed!\n"); in main()