sending Post Data and files

2007-05-09 Thread Lara Röpnack

I have two questions or suggestions.

1.) How can I send Post Data with Line Breaks? I can not press enter and \n
or \r or \r\n dont work...
2.) I dont understand the post File. I can Send one file - but I cant give
the name. Normaly I have a Form with a Formelement Input type=file name=xy
Is it possible to send a File with a name? Is it possible to send two files?

Please help me. I have searched for Solution many Hours bur I hav'nt find
anything.

Best regards

Lara Röpnack

(sorry for my bad englisch)


Re: sending Post Data and files

2007-05-09 Thread Steven M. Schweda
 1.) How can I send Post Data with Line Breaks? I can not press enter
 and \n or \r or \r\n dont work...

   Put the data into a file, and use --post-file=FILE_NAME?

 Is it possible to send a File with a name?

   Other than with --post-file=FILE_NAME?

 Is it possible to send two files?

   I believe not.  At least not using --post-file.

 [...] Input type=file [...]

   I've never tried that, so I know even less about that than I do about
--post-file (which I did use once).



   Steven M. Schweda   [EMAIL PROTECTED]
   382 South Warwick Street(+1) 651-699-9818
   Saint Paul  MN  55105-2547


RE: sending Post Data and files

2007-05-09 Thread Tony Lewis
Lara Röpnack wrote:

 

 1.) How can I send Post Data with Line Breaks? I can not press enter

 and \n or \r or \r\n dont work...

 

You don’t need a line break because parameters are separated by ampersands;
a=1b=2


 2.) I dont understand the post File. I can Send one file - but I cant give

 the name. Normaly I have a Form with a Formelement Input type=file

 name=xy Is it possible to send a File with a name? Is it possible to send

 two files? 

 

On the command line you can use --post-data=”a=1b=2” or you can put the
data into a file. For example if the file “foo” contains the following
string:

a=1b=2

you would use --post-file=foo.

 

Currently, it is not possible to send files with wget. It does not support
multipart/form-data.

 

Tony



Re: sending Post Data and files

2007-05-09 Thread Steven M. Schweda
From: Tony Lewis

 You don't need a line break because parameters are separated by
 ampersands; a=1b=2

   You need a line break if you need a line break, as when you wish to
set a variable to multiple lines of text.  For example:

  subject=Test messagemsg_text=   This is a test.
  This is only a test.
  If this had been an actual message,
  It would have been delivered appropriately.

Put that stuff into a file named, say, test.dat, and specify
--post-file=test.dat.  The server should then set the variable
subject to Test message, and msg_text to:

 This is a test.
  This is only a test.
  If this had been an actual message,
  It would have been delivered appropriately.

(with the line breaks).



   Steven M. Schweda   [EMAIL PROTECTED]
   382 South Warwick Street(+1) 651-699-9818
   Saint Paul  MN  55105-2547