1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * $Id: simplepost.c,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
13 #include <curl/curl.h>
20 static const char *postthis
="moo mooo moo moo";
22 curl
= curl_easy_init();
24 curl_easy_setopt(curl
, CURLOPT_URL
, "http://posthere.com");
25 curl_easy_setopt(curl
, CURLOPT_POSTFIELDS
, postthis
);
27 /* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
29 curl_easy_setopt(curl
, CURLOPT_POSTFIELDSIZE
, (long)strlen(postthis
));
31 res
= curl_easy_perform(curl
);
34 curl_easy_cleanup(curl
);