cURL / Mailing Lists / curl-library / Single Mail


Re: Sending xml file using POST method

From: Daniel Stenberg <>
Date: Tue, 10 Feb 2009 16:33:47 +0100 (CET)

On Tue, 10 Feb 2009, wrote:

> 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:
> ------------------------------aa4ede2b4649

You cannot just at your own discretion select what POST method to use. If you
use libcurl formpost API, it will create and send a multipart formpost. If you
DO NOT want it formatted like that I suggest you use a "regular" post like

Received on 2009-02-10