cURL / Mailing Lists / curl-library / Single Mail


Sending xml file using POST method

From: <>
Date: Tue, 10 Feb 2009 10:13:05 -0500

Hi all
I'm trying to send an XML file to a HTTP application server using the
POST method through the C API. I use
CONTENTTYPE="application/x-www-form-urlencoded" but it seems that curl
overrides my selection and set it to "multipart/form-data". On the
server side, the data is OK but it starts with a header like this:
Content-Disposition: form-data; name="IntrantsXml";
Content-Type: application/x-www-form-urlencoded

Here is part of my C code:

               CURLFORM_COPYNAME, "IntrantsXml",
               CURLFORM_FILE, inputfile,

How can I force the data to be received intact without this
Content-Disposition stuff at the beginning of my XML data.

Marc Perreault
Received on 2009-02-10