cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: HTTP 1.1 POST

From: Rick Welykochy <rickw_at_ce.com.au>
Date: Wed, 16 Aug 2000 16:31:55 +1000

I grabbed this from the mailing list archive:

---------------------------------------------------------------

Daniel Stenberg replied to the following:

> On 10 Aug 2000, Balaji S Rao wrote:
>
> > How can a HTTP 1.1 POST be accomplished using CURL. If I want to POST to
> > a particular URL without the default application/x-form-www-urlencoded
> > but rather a custom Content-type, say application/xml.
>
> Then I don't think -d is what you want. -d is mainly for filling out HTML
> forms and submit data to CGIs and similarly. They mostly don't even know what
> kind of Content-type the POST is made with.
>
> > I tried POST using -d and -H specifying custom headers, but it appears
> > that curl always appends a default encoding.
>
> That's a mistake. I'll correct that in the next release.
>
> Still, what are you trying to accomplish with this Content-type thing? Isn't
> a -F post what you really want? Using that, you can control content-type
> too...

I'm having a similar problem.

-F does not work. It sends the content as

Content-type: multipart/form-data

I need the following:

Content-length: 12345
Content-type: text/xml

blah blah blah ...

Unfortunately, cURL is sending Content-type: application/x-www-form-urlencoded
as well as my -H argument.

1. when is the next release of cURL coming out? I'm using 6.5

2. do you have a work-around for this?

3. can I help you patch/fix this problem?

Cheers
Rick Welykochy
e-commerce developer

----------------- rickw_at_ce.com.au ------------------
Corporate Express Australia - Electronic Commerce Team
Order office products from http://www.ce.com.au
Ph 02-9335-0435 Fax 02-9335-0753 Helpdesk 02-9335-0501
Opinions expressed in this message are my own and not
representative of Corporate Express Australia Limited.
Received on 2000-08-16