Useful for scripts and health checks.
Section: cURL Debugging Patterns
Print only the status code
bash
bash
curl -s -o /dev/null -w '%{http_code}\n' https://example.com/healthExplanation
A compact pattern for extracting the final status code in shell scripts.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing cURL Debugging Patterns
Print redirect target
Show the redirect location without fully following it.
Send JSON and inspect response
Test common API validation and auth failures.