1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * $Id: simplepost.c,v 1.1 2002/06/19 12:30:12 bagder Exp $
12 #include <curl/curl.h>
19 char *postthis="moo mooo moo moo";
21 curl = curl_easy_init();
23 curl_easy_setopt(curl, CURLOPT_URL, "http://posthere.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, strlen(postthis));
30 res = curl_easy_perform(curl);
33 curl_easy_cleanup(curl);