curl speaks HTTP, HTTPS, and many other protocols. Set methods with -X, headers with -H, and data with -d. For TLS, --cacert pins trust stores and -k skips verification only for controlled tests. -w prints timing variables after transfer—useful for latency splits. Save bodies with -o and show headers with -D or -i.
| Goal | Flags | Note |
|---|---|---|
| Follow redirects | -L | Combine with max-redirs for safety |
| JSON POST | -H Content-Type: application/json -d @file | Use @ to load body from disk |
| Pin host to IP | --resolve | Test vhosts without DNS |
Related
What curl does, curl vs wget, DNS troubleshooting, Linux networking commands