Request, inspect and script HTTP in a terminal.
curl
See the response, not just the body
curl -sS -D - -o /dev/null https://example.com
Fail on HTTP errors
curl -sSf https://example.com/api
-f makes curl exit non-zero on 4xx and 5xx. Plain -s hides errors and exits 0, which breaks scripts quietly.
Follow redirects and keep the method
curl -sSL -X POST -d 'a=1' https://example.com/hook
Set a timeout so scripts do not hang
curl -sS --max-time 10 --connect-timeout 5 https://example.com