安装curl:https://curl.haxx.se/download.html

测试:tomcat默认禁用put,delete返回403

GET

curl -HAccept:text/plain http://example.com/base

PUT

curl -XPUT -HContent-type:text/plain --data "stuff:morestuff" http://example.com/base?param=val

DELETE

curl -XDELETE http://example.com/base/user/123

POST

curl -d "param1=value1&param2=value2" http://example.com/base/
posted on 2016-09-05 15:03  呆萌小码  阅读(821)  评论(0编辑  收藏  举报