Usage curl simulation request restful

1. the Get Request 

 

curl -XGET http://localhost/

 

2. POST request 

 

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

 

3. DELETE request 

 

curl -XDELETE http://localhost

 

4. the PUT request 

 

 

 

Guess you like

Origin www.cnblogs.com/bob-coder/p/11502337.html