使用curl完成post、get操作
#!/bin/sh
# "curl 的http方法使用:post、get"
echo
#####################################################################################################################
# POST 方法
# -d json串内容
# -H http内容
# -X http方法
curl \
-d {
\"cpxh\":\"C162214\"} \
-H "content-type: Application/json" \
-X POST \
http://192.168.1.166:80/test
#####################################################################################################################
# GET 方法
# 查看 Content
# curl http://192.168.1.110:8080/test
# -I 只看协议头
# curl -I http://192.168.1.110:8080/test
# -i 协议头 + Content
# curl -i http://192.168.1.110:8080/test
echo && echo