curl-users
Re: posting regular data file with --data
Date: Fri, 23 Mar 2007 15:59:55 -0700
You're misinterpreting the --data option. It expects the data to follow
the option on the command line.
According to the description of the --data option if you want it to read from
stdin you should specify '-':
curl --data - <myfile
or if you want it to read from a file you start it with '@'
curl --data @myfile
john-
> hey all,
>
> I've been trying to do a regular post using the '--data' option to curl.
> Since the data I'm posting is relatively large, and contains newlines, I'd
> like to be able to use the '<' option, as in
>
> curl --data '<myfile'
>
> but this does not work.. Is there a specific reason why -F 'name=<file'
> works and why the above does not?
>
> Thanks,
>
> Ed
>
> (ps - is there any specific trick to curl in order to make a SOAP call? I've tried:
>
> curl --header 'Content-Type: text/xml' --data '<SOAP-ENV:Envelope..?...xml_string../SOAP-ENV:Envelope>'
>
>
> without luck... is there something more to it than this? An example would be *very* helpful..
> )
Received on 2007-03-24