HTTP cheatsheet
HTTP: Inspect requests with curl
6 common HTTP tasks.
See the whole conversation
Print the request headers, response headers and TLS details.
curl -v https://example.com
Print only the status code
Discard the body and print the HTTP status.
curl -s -o /dev/null -w "%{http_code}\n" https://example.com
Test conditional caching
Send an ETag and check for a 304 response.
curl -i -H 'If-None-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"' https://example.com/data.json