wget is a standard tool for issuing HTTP requests from a command line. Even with having Indy’s TIdHttp on a Mac now, it might be handy for some tests or scripts to use wget.
The equivalent of
Unfortunately though wget is not installed by default on MacOSX (only curl is, which is a similar command, with quite a different syntax), but there is an easy way to get wget:
As Delphi developer, using Delphi XE 4′s mobile compiler, you probably already have Xcode (including command line tools) installed – which would be the only requirement for the following. Open a terminal window on your Mac and run the script below. It may take a minute or two and when done wget will be ready to use (it will automatically be copied into one of your bin directories)
curl -O http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz
tar xvzf wget-1.14.tar.gz
sudo make install
There might be newer versions than 1.14, but I didn’t check, 1.14 works just fine for me.
Credits: Mike Beach
Share this on del.icio.us
Share this on Reddit