ITeye博客

curl常用命令

fairy_xzc · 2018-01-05 13:36 · Linux · 编程语言 · Markdown

原创转载请注明出处:http://agilestyle.iteye.com/blog/2406755

 

GET

curl protocol://address:port/url?args

curl http://127.0.0.1:8080/login?username=hello&password=world

 

POST

curl -d "args" protocol://address:port/url

curl -d "username=hello&password=world" http://127.0.0.1:8080/login

 

POST with json body

curl -H "Content-Type: application/json" -X POST --data (json.data) protocol://address:port/url

curl -H "Content-Type: application/json" -X POST --data '{"username": "whoami"}' http://127.0.0.1:8080/login

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。