如何使用curl发送JSON数据

$ curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' [URL]

Command
curl
Description
发送带有JSON数据的POST请求。用法:curl -X POST -H ... -d ...
Deep Dive
-H: Header(头信息)\n-d: Data(数据)\n确保正确引用JSON数据。