1、获得对方的响应首部信息
curl -I http://www.yinzhengjie.org.cn
2、显示网页的全部信息
curl -i "https://www.baidu.com"
3、显示一次的http请求的通信过程
curl -v www.baidu.com
4、模拟get 请求
当发起http请求时,curl会默认发起GET请求,也可以"-X GET"方式指定
curl -X GET http://www.baidu.com
5、模拟post提交
1) 有body参数
curl -d “param1=value1¶m2=value2”“http://www.baidu.com”
2) 有JOSN格式的body和header入参
curl -H 'content-type: application/json' -X POST -d '{"accountType":"4","channel":"1","channelId":"YW_MMY","uid":"13154897541","phoneNumber":"13154897541","loginSource":"3","loginType":"1","userIp":"192.168.2.3","postTime":"14633fffffffffff81286","userAgent":"Windows NT","imei":"352600051025733","macAddress":"40:92:d4:cb:46:43","serialNumber":"123"}'
http://192.168.129.xx/AntiRushServer/api/ActivityAntiRush
更多请看:https://www.cnblogs.com/coderland/p/5883763.html