curl 模拟restful 请求的用法

mac2022-06-30  80

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请求

 

 

 

转载于:https://www.cnblogs.com/bob-coder/p/11502337.html

最新回复(0)