Posted almost 9 years ago. Visible to the public.

Disable output when using cURL

cURL makes a web request and shows you the response body.

You can redirect the response body to /dev/null just like for many other programs. But if you do that, cURL will display some short information about the request you are making:

Copy
$ curl http://www.example.com/ > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 30865 100 30865 0 0 4793 0 0:00:06 0:00:06 --:--:-- 10199

If you want no output at all (for example for cronjobs), add the --silent switch:

Copy
curl --silent http://www.example.com/ > /dev/null

By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Owner of this card:

Avatar
Arne Hartherz
Last edit:
over 5 years ago
by Arne Hartherz
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more