Lines Matching defs:curl
12 * are also available at https://curl.se/docs/copyright.html.
21 * SPDX-License-Identifier: curl
31 #include <curl/curl.h>
61 CURL *curl;
70 curl = curl_easy_init();
71 if(curl) {
72 curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.org/");
75 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
78 curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
82 curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
84 curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
88 curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
91 res = curl_easy_perform(curl);
108 curl_easy_cleanup(curl);