Handy cURL options
The cURL flags you will use most.
| Option | Use it to |
|---|---|
-i | Show response headers (balance, limits). |
-N | Print streamed events as they arrive. |
-sS | Hide the progress meter but still show errors. |
--fail-with-body | Exit with an error on 4xx and 5xx but still print the reply. |
-d @file.json | Send a request body from a file. |
-F name=value / -F file=@path | Send a multipart form (uploads). |
-L -o name | Follow redirects and save a download. |
-w '%{http_code} %{time_total}s\n' -o /dev/null | Print just the status and timing. |
Send a long body from a file and pretty-print the answer:
curl -sS "https://api.falcorelabs.com/v1/wave" -H "Authorization: Bearer $FALCORE_API_KEY" -H "Content-Type: application/json" -d @body.json | python3 -m json.tool