curl 常用命令

curl 發送post請求 json數據

curl -X POST -H "Content-Type: application/json" -H "referer:http://localhost" http://localhost:8080/test/hello -d '{"param":"20210608"}'

-- 用本地json文件 (在執行該命令下的目錄中新建param.json)
curl -X POST -H "Content-Type: application/json" -H "referer:http://localhost" http://localhost:8080/test/hello -d @param.json

  

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章