curl-users
Re: XML Post with no form variables
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 21 Sep 2004 08:15:16 +0200 (CEST)
Date: Tue, 21 Sep 2004 08:15:16 +0200 (CEST)
On Mon, 20 Sep 2004, Heath Boutwell wrote:
> I am trying to submit an XML document WITHOUT using form variables. Is this
> possible?
curl sends what you tell it to. It has no notion of "form variables" for plain
POSTs.
> curl -d test.xml -H "Content-Type: text/xml" https:www.xxx.com
>
> Where test.xml contains the xml doc I am trying to submit. Is this the
> correct syntax as xxx.com isn't receiving the request correctly.
This will send the text "test.xml" to the site with the given Content-Type. I
guess you want to use -d @test.html and then it'll send the given data (minus
the newlines) or you might want to use --data-binary.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-09-21