cURL / Mailing Lists / curl-library / Single Mail

curl-library

Simple (?) HTTP transfer and recieving question

From: Joel Apter <japter_at_ibxtech.com>
Date: Thu, 29 May 2003 16:58:50 -0400

I am writing an application and am using libcurl solely for its HTTP interaction. I have some XML data that I need to send via HTTP to a server and need to receive the server's response. Currently I have my data url encoded in a c style string (char *) and POST it via a curl_easy_setopt(curl, CURLOPT_POSTFIELDS, xml_data) function call. The problem is that the response from the server that is echoed to stdout (need some help getting this into a string) is that the server could not validate the xml properly (the response is also in xml). I'm pretty sure the HTTP header has to have Content-Type: text/xml. Is there any way to change the content type in the header? Also, can someone show me a way to store the data received from the server into a string? Thanks in advance for any help.
 
-Joel Apter

-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
Received on 2003-05-29