wget to POST data

[via Bertrand, 1] With wget can you can also POST data, as long as you use a more recent version:

wget –post-data \’really_long_set_of_options\’ http://foo.com/cgi/bar

It is either possible to send a string from command line or to read data directly from a file:

–post-data=STRING use the POST method; send STRING as the data.
–post-file=FILE use the POST method; send contents of FILE.

[1] http://codeconsult.ch/bertrand/archives/000452.html

Leave a Reply