1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
11 #include <curl/curl.h>
18 curl = curl_easy_init();
20 /* First set the URL that is about to receive our POST. This URL can
21 just as well be a https:// URL if that is what should receive the
23 curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi");
24 /* Now specify the POST data */
25 curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");
27 /* Perform the request, res will get the return code */
28 res = curl_easy_perform(curl);
31 curl_easy_cleanup(curl);