curl发送post请求,入参是json格式:
curl -H "Content-Type:application/json;charset=utf-8" -X POST -d '{"user": "admin", "passwd":"12345678"}' http://192.168.0.0:8080
curl发送post请求,入参是表单格式格式:
curl -H "Content-Type:application/x-www-form-urlencoded;charset=utf-8" -X POST -d 'username=hcadmin&password=123' http://192.168.0.0:8080
curl发送get请求:
curl -X GET http://www.baidu.com