cURL post JSON 数据
目录
使用 curl 通过 post 方法提交 json 格式的数据:
curl --request POST \
--header "Content-Type: application/json" \
--data '{"foo":"bar","num":1}' \
http://localhost:3000/path/参数说明:--request POST, 可选。当使用 --data 选项时,默认就是 post 方法
使用 curl 通过 post 方法提交 json 格式的数据:
curl --request POST \
--header "Content-Type: application/json" \
--data '{"foo":"bar","num":1}' \
http://localhost:3000/path/参数说明:--request POST, 可选。当使用 --data 选项时,默认就是 post 方法