1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
12 #include <curl/curl.h>
19 static const char *postthis="moo mooo moo moo";
21 curl = curl_easy_init();
23 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
24 curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
26 /* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
28 curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
30 res = curl_easy_perform(curl);
33 curl_easy_cleanup(curl);