cURL / Mailing Lists / curl-users / Single Mail


Re: Posting HTTP Message via a file through --data-ascii

From: Nivedan Nadaraj <>
Date: Thu, 8 Jun 2006 15:38:38 +0800

Hi Ralph,

Thank you, this worked. I provided in my configuration file as
When we invoke from the shell script we can do ./curl --config

Option 2
Another way to do the same thing was to assign the content of the file (if
its seems sensible) into a Shell Variable.
$ MY_VAR="test data";
And invoke ./curl --data-ascii="$MY_VAR" --config ./myconfigfile.txt

Thank you all,

Nivedan Nadaraj

"Ralph Mitchell" <>
Sent by:
08/06/2006 12:05 PM
Please respond to
the curl tool <>

"the curl tool" <>

Re: Posting HTTP Message via a file through --data-ascii

According to the man page:

   "If you start the data with the letter @, the rest should be a file
name to read the data from"

So, --data-ascii="@filename" ought to do it.

Ralph Mitchell

On 6/7/06, Nivedan Nadaraj <> wrote:

Hi all,

I need to post a chunk of data i.e a HTTP message content across. Using
--data-ascii I am able to do that by pasting the chunk of data.
However if I needed to do the same by having the chunk of data in a text
file, how would I be able to do that ?

e.g --data-ascii="<xml-root><sometag>55</sometag></xmlroot>" // This

e.g --data-ascii= ?? Can I specify a way to indicate where to pick the
content from ?

Any help appreciate

Nivedan Nadaraj
Received on 2006-06-08