cURL / Mailing Lists / curl-users / Single Mail


Passing parameters to perform HTTP Post using libcurl- Curl

From: Shrestha, Anu <>
Date: Wed, 05 Dec 2007 11:24:39 -0500

I was just sending an xml document to do HTTP post before. Now I have a
need to send additional parameter (property file) along with the xml
document. The host service is expecting two parameters. One property
file, second xmlstring

char* prop="";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, prop); /* how do I send
this prop file along with the xmlstring * ???*/

//Post XML Document
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, xmlstring);

/* Send document to engine */
res = curl_easy_perform(curl);

Please help
Thank you
Received on 2007-12-05