curlwtfcurlwtf

Flag guide

What does curl -H mean?

-H (long form: --header) adds a custom HTTP header to the request. You can use multiple -H flags to add as many headers as you need.

-H "Authorization: Bearer TOKEN"
Send a Bearer token for OAuth 2.0 / API key auth.
-H "Content-Type: application/json"
Tell the server you're sending JSON. Required for most REST APIs.
-H "Accept: application/json"
Tell the server you want JSON back.
-H "X-API-Key: your-key"
Custom header for API key authentication.
-H "Cookie: session=abc123"
Send a specific cookie with the request.

Full example

curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json"

Paste any curl into curlwtf.com for a full plain-English breakdown of every -H header.

curl -Xcurl -dcurl -k
© 2026 curlwtf