What does the -d in this cURL command mean? What does the -d in this cURL command mean? curl curl

What does the -d in this cURL command mean?


-d specifies the body of the request. From the man-page:

-d, --data (HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to -F, --form.

-d, --data is the same as --data-ascii. --data-raw is almost the same but does not have a special interpretation of the @ character. To post data purely binary, you should instead use the --data-binary option. To URL-encode the value of a form field you may use --data-urlencode.

It is interesting that you use a service that uses GET with request bodies, as explained here, it is possible but unwanted.

For example; proxies are allowed to remove the body. But as long as there are no machines between you and their server, it might work; and they probably have software that allows them to interpret the body.