How to Make JSON REST POST with Curl

This is just a reference to remind myself and others how to make a JSON POST call with curl.

The JSON is in the body of the post.

I hope this is helpful to someone.

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"json":{"data key":"value here"}}' http://api.some-site.com/resource

Leave a Reply

Your email address will not be published.