一、get请求:
1、使用curl命令:
curl “http://www.chinayunhua.com” 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地
curl -i “http://www.chinayunhua.com” 显示全部信息
curl -l “http://www.chinayunhua.com” 只显示头部信息
curl -v “http://www.chinayunhua.com” 显示get请求全过程解析
使用wget命令:wget “http://www.chinayunhua.com”
二、post请求
1、使用curl命令(通过-d参数):
curl -d “param1=value1¶m2=value2” “http://www.baidu.com”
使用wget命令:(–post -data参数)wget –post-data ‘user=foo&password=bar’ http://www.chinayunhua.com