curl 模拟restful 请求的用法

1.  Get请求

 

curl -XGET http://localhost/

 

2.  POST请求

 

curl -XPOST -H “Content-Type:application/json” -d ‘{“action”:“create”, “size”:1024}’ http://localhost:4806/v1.0/sqh001/disks/rbd1

 

3.  DELETE请求

 

curl -XDELETE http://localhost

 

4.  PUT请求

 

 

 

posted @ 2019-09-10 19:14  bob_coder  阅读(759)  评论(0)    收藏  举报