cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: curl command line options

From: Nielsen Linus <Linus.Nielsen_at_elema.siemens.se>
Date: Thu, 12 Jul 2001 08:41:45 +0200

> I have the following script to retreive data from a website
> according to 2 variables; "seachtype" and "queryvalue".
>
> curl -s -d searchtype=@srctyp -d queryvalue=@srcno -d
> "action=Search"
> http://www.ato.gov.au/scripts/super//search.asp > atoresult
>
> I have had the retreival work when the values are hard coded
> but I want to be able to pass these values as files "srctyp"
> and "srcno". I used the syntax as shown in an example for the
> -F option.
>
> Is this syntax not available for -d ?

Yes, it is. Have you tried?
It should work, unless there is a bug in curl.

Remember that the data in the file must be URL-encoded.

Which version of curl are you using?

You can always look at the documentation at our web site:

http://curl.haxx.se/docs/manpage.html

/Linus
Received on 2001-07-12