通过curl发送请求
-发送post
curl --help命令可查看详细的使用用法
1.发送一般post数据
curl -d 'name='wade'?enable=True' "http://127.0.0.1/devops/test"
2.发送json数据
curl -H "Content-Type: application/json" -X POST -d '{"name":"wade.qu", "passwd":"123456","data":"this is test content"}' "http://127.0.0.1/devops/test"
-get请求
1.一般用法测试健康检查路径
curl -v http://127.0.0.1/health
2.接口get请求测试
curl "http://127.0.0.1/devops/test?name=wade"