linux下使用shell发送http请求

1. get请求
curl命令默认下就是使用get方式发送http请求。
curl www.baidu.com

2. post请求
使用-d参数,形式如下:
curl -d "param1=value1&param2=value2" www.baidu.com


其他参数
-I 
只显示头部信息。
i 
显示全部信息。
-v 
显示解析全过程。

参考:

https://blog.csdn.net/bcfdsagbfcisbg/article/details/78603781

原文地址:https://www.cnblogs.com/sea-stream/p/11403065.html