Flag guide
What does curl -d mean?
-d (long form: --data) sends data in the request body. It automatically sets the HTTP method to POST if you haven't set it explicitly with -X.
Send JSON
curl -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-d '{"name":"Alex","email":"alex@example.com"}'Send form data
curl -X POST https://api.example.com/login \ -d "username=alex&password=secret"
Send a file
curl -X POST https://api.example.com/upload \ --data-binary @report.json
Paste any curl into curlwtf.com to get a plain-English explanation of what the -d data contains and what it does.