Lines Matching defs:curl
12 * are also available at https://curl.se/docs/copyright.html.
21 * SPDX-License-Identifier: curl
30 #include <curl/curl.h>
68 CURL *curl;
85 /* get a curl handle */
86 curl = curl_easy_init();
87 if(curl) {
89 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/index.cgi");
92 curl_easy_setopt(curl, CURLOPT_POST, 1L);
95 curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
98 curl_easy_setopt(curl, CURLOPT_READDATA, &wt);
101 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
115 res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
122 curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)wt.sizeleft);
138 res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
145 res = curl_easy_perform(curl);
152 curl_easy_cleanup(curl);