cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: POSTing

From: Daniel Stenberg <Daniel.Stenberg_at_haxx.nu>
Date: Mon, 15 May 2000 09:29:00 +0200 (MET DST)

On Mon, 15 May 2000, asm prog wrote:

> I was wondering, is it possible to post data that is not of type
> url-encoded.

Yes it is possible.

> Specifically, I want to post an XML document (text/xml). I have a Java
> servelet that accepts POSTS of type text/xml, but, I can't seem to find
> the proper curl usage.

They are most likely accepting 'multipart/form-data' posts. You post those
with curl using the -F option.

If they really must have the text/xml content-type, then you can enfore the
file you upload to get specified with that type.

It could look something like this:

        curl -F "fileupload=@poo.xml;type=text/xml" www.uploadsite.com

-- 
   Daniel Stenberg - http://www.contactor.se/~dast - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on 2000-05-15