How to send PUT request using Curl?

To make a PUT request with Curl, you need to use the -X PUT command-line option. PUT request data is passed with the -d parameter. If you pass -d and omit -X, Curl will automatically choose the HTTP POST method. The -X PUT option explicitly tells Curl to choose the HTTP PUT method instead of POST. The JSON data type is set using the -H "Content-Type: application/json" command-line parameter. Click Run to execute the Curl PUT JSON example online and see the results. This will send JSON data to the ReqBin echo URL.
Loading...