Yo! curl is my daily driver for API testing. Here’s how I use it:
Need headers? `curl -I [url]` gives just the response headers.
For JSON APIs, `curl -H "Accept: application/json" [url]` ensures you get JSON back.
And yeah, the output can be messy—try `curl [url] | jq` if it’s JSON (install `jq` first tho).
Big gotcha: Forgot to quote JSON data? Bash will eat your curly braces. Always wrap `-d` payloads in single quotes!
Need headers? `curl -I [url]` gives just the response headers.
For JSON APIs, `curl -H "Accept: application/json" [url]` ensures you get JSON back.
And yeah, the output can be messy—try `curl [url] | jq` if it’s JSON (install `jq` first tho).
Big gotcha: Forgot to quote JSON data? Bash will eat your curly braces. Always wrap `-d` payloads in single quotes!
