The simplest way is three calls to
curl_easy_setopt
CURLOPT_POST
tells the library that you're going to do a post.
CURLOPT_POSTFIELDS
tells the library that this is a pointer to the data that you want to send in exactly the form the server expects it. It's up to you to make sure that this format is correct. If you're using an XML expecting webservice you get to form the XML, libCurl won't help.
CURLOPT_POSTFIELDSIZE
tells the library the size of the data you want sent.
Alternatively you can read the
curl_easy_setopt[
^] docs and see how you can use a callback to form the data - but whether you need that depends on how you interact with the server.