码迷,mamicode.com
首页 > Web开发 > 详细

curl的用法

时间:2020-04-13 14:02:42      阅读:81      评论:0      收藏:0      [点我收藏+]

标签:用法   splay   use   就是   pos   ica   span   code   one   

GET请求

curl http://localhost:8888/mock/api

POST请求(-X可以省略,-d默认就是POST参数)

curl -X POST -d {"name":"api1","content":"api1 conent","method":"get","url":"/users"} -H Content-Type: application/json http://localhost:8888/mock/api

PUT请求

curl -X PUT -d {"name":"api1","content":"api1 conent","method":"get","url":"/users"} -H Content-Type: application/json http://localhost:8888/mock/api

DELETE请求

curl -X DELETE -d {"name":"api1","content":"api1 conent","method":"get","url":"/users"} -H Content-Type: application/json http://localhost:8888/mock/api

 

 

 

 

curl的用法

标签:用法   splay   use   就是   pos   ica   span   code   one   

原文地址:https://www.cnblogs.com/mengff/p/12690893.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!