4 ms·
We all have some user-bias and in this case it is geared towards seeing Curl as some shell command to download files through HTTP/S. Luckily, Curl is much more
by mobiplayer 12y ago
We all have some user-bias and in this case it is geared towards seeing Curl as some shell command to download files through HTTP/S.
Luckily, Curl is much more than that and it is a great and powerful tool for people that work with HTTP. The fact that it writes to stdout makes things easier for people like me that are no gurus :) as it just works as I would expect.
When working with customers with dozens of different sites I like to be able to run a tiny script that leverages Curl to get me the HTTP status code from all the sites quickly. If you're migrating some networking bits this is really useful for a first quick check that everything is in place after the migration.
Also, working with HEAD instead of GET (-I) makes everything cleaner for troubleshooting purposes :)
My default set of flags is -LIkv (follow redirects, only headers, accept invalid cert, verbose output). I also use a lot -H to inject headers.