cURL post JSON data on Windows
By:Roy.LiuLast updated:2019-08-11
On Windows, the key to send JSON data is double-quotes like this
-d "{\"name\":\"Spring Forever\"}"
cURL to POST a JSON data
curl -X POST localhost:8080/books
-H "Content-type:application/json"
-d "{\"name\":\"Spring Forever\",\"author\":\"pivotal\"}"
From:一号门

COMMENTS