POST JSON data with cURL

Sends a POST request with JSON data using curl by setting the content-type of the request to "application/json".

Authored by: Sean Patrick Floyd
json_data
url

Command
Copy
curl --header "Content-Type: application/json" \ --request POST \ --data 'json_data' \ url
Tags