使用git curl服务测试-----Restful服务
1、post【添加一个对象】
curl -l -H "Content-type: application/json" -X POST -d '{"name":"aaaa","state":"bbbb","country":"cccc","map":"ddd"}' http://localhost:8080/city2
2、get【获取一个对象】
curl.exe http://localhost:8080/city/xxx
---------------xxx为对象ID
3、get【获取分页】
curl.exe http://localhost:8080/city2?page=10
---------------page页面
4、delete【删除一个对象】
curl -X DELETE http://localhost:8080/city2?id=xxx
---------------xxx为对象ID
5、put【修改一个对象】
curl -H "Content-Type:application/json" -X PUT -i -d '{"name":"aaaa","state":"bbbb","country":"cccc","map":"ddd"}' http://localhost:8080/city2?id=xxx
---------------xxx为对象ID
1、post【添加一个对象】
curl -l -H "Content-type: application/json" -X POST -d '{"name":"aaaa","state":"bbbb","country":"cccc","map":"ddd"}' http://localhost:8080/city2
2、get【获取一个对象】
curl.exe http://localhost:8080/city/xxx
---------------xxx为对象ID
3、get【获取分页】
curl.exe http://localhost:8080/city2?page=10
---------------page页面
4、delete【删除一个对象】
curl -X DELETE http://localhost:8080/city2?id=xxx
---------------xxx为对象ID
5、put【修改一个对象】
curl -H "Content-Type:application/json" -X PUT -i -d '{"name":"aaaa","state":"bbbb","country":"cccc","map":"ddd"}' http://localhost:8080/city2?id=xxx
---------------xxx为对象ID