直接使用json串请求:
curl --location --request POST 'http://localhost:8080/xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"NAME": "xxx"
}'
发送单独json文件:
curl -H "Content-Type: application/json" -X POST -d '@bc.json' 'http://localhost:8080/xxx'
文件名称前的@不是文件名的一部分,而是curl的特殊标记