## Get请求
···
curl http://192.168.94.245:9090/getPerformerInfo?json=\{"performerId":666\}
花括号 需要两个反斜杠
···
## Post请求
* x-www-form-urlencoded方式
curl localhost:9999/api/daizhige/article -X POST -H
"Content-Type:application/json" -d 'hello=world'
* json方式
curl localhost:9999/api/daizhige/article -X POST -H
"Content-Type:application/json" -d '{"title":"comewords","content":"articleContent"}'
* multiPart
curl localhost:3000/api/multipart -F raw=@raw.data -F hello=world
示例:
curl -k https://211.159.201.91:443/api/upLoadGyroscopeInfo -H "token:&HSj#kLJ6O%aeNDi" -F file=@bin.txt
最后
以上就是精明硬币最近收集整理的关于curl get json数据格式的全部内容,更多相关curl内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复