To make a PUT request with Curl, you need to use the -X PUT command-line option. Request data is passed with the -d option. If you pass -d and omit -X, Curl will automatically choose the HTTP POST method for your request. The -X PUT option explicitly tells Curl to choose the HTTP PUT method instead of POST.
The HTTP PUT request method is used to update an existing resource on the server. The HTTP PUT method is defined as idempotent, which means that multiple identical HTTP PUT requests must have the same effect as a single request.
How to send data using the PUT method with Curl?
As with any other Curl request, you can pass data to Curl using the -d command-line option. Note that Curl will automatically select the application/x-www-form-urlencoded content type for your data unless you explicitly specify it with the -H command-line option. For example, to send JSON data, you also need to use the -H "Content-Type: application/json" command line parameter for your PUT request.