cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Command Line cURL Posting XML Error

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 28 Jul 2003 10:14:18 +0200 (CEST)

On Fri, 25 Jul 2003 TMcGee_at_CallSolutions.com wrote:

> I posted an earlier message where I was getting an Method Not Found 405
> error, when trying to post a XML file using command line cURL:
>
> curl -v -o testit.txt -F @<filename>;type=text/xml --trace-ascii trace.txt
> <website>

This command is not using the correct syntax and will never work. As discussed
before.

> I then tried this command, but received the same error in trace.txt:
>
> curl -v -o testit.txt -F file=@filename;type=text/xml <website>
>
> Does anyone know of a different way to code this command line code,
> maybe using something different, than what I'm showing?
>
> Here is the error I get in the trace file:
>
> 0000: ------------------------------3b80c0c3715f
> 002c: Content-Disposition: form-data; name="@<filename>;type"
> 0069:
> 006b: text/xml
> 0075: ------------------------------3b80c0c3715f--

I don't understand how you manage to do this.

I just now tried this command line:

curl -v -o testit.txt --trace-ascii dumpit -F "file=@README;type=text/xml" localhost/

...which produced a part that looked like:

=> Send data, 2400 bytes (0x960)
0000: ------------------------------1422f0bfedc4
002c: Content-Disposition: form-data; name="file"; filename="README"
006c: Content-Type: text/xml
0084:
0086: _ _ ____ _ .
00c6: ___| | | | _ \| | .
0106: / __| | | | |_) | | . | (__
0146: | |_| | _ <| |___ . \___|\___/|_| \
0186: _\_____|..README.. Curl is a command line tool for transfering
01c6: data specified with URL. syntax. Find out how to use Curl by re
[stop]

what operating system are you using?

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-07-28