1、curl -H "Content-Length:0" -X GET "http://127.0.0.1:8080" 2、curl -H "Content-Type: application/json" -H "connection:Keep-Alive" -s -X POST -d ‘{"id":"1","type":"0"}‘ "http://127.0.0.1:/8080/xxx/xxx" 3、RESULT=`curl -H "Content-Type: application/json" -s -X POST -d ‘{"id":"‘$id‘","type":"‘$type‘"}‘ "http://127.0.0.1:8080/xxx/xxx"` echo $RESULT;
原文:https://www.cnblogs.com/uestc2007/p/14388673.html