Linux curl命令详解
Eijux(讨论 | 贡献)2021年5月22日 (六) 20:28的版本 (建立内容为“category:curl == 关于 == 【转自:'''[http://aiezu.com/article/linux_curl_command.html http://aiezu.com/article/linux_curl_command.html]'''】 == 语…”的新页面)
关于
【转自:http://aiezu.com/article/linux_curl_command.html】
语法
curl [options] [URL...]
curl命令参数详解:
参数组 | 参数 | 描述 |
---|---|---|
url | url | 需要抓取的一到多个URLs;
支持多个通配符方式:
|
请求头 | -H "name: value" --header "name: value" |
(HTTP)添加一个http header(http请求头); |
-H "name:" --header "name:" |
(HTTP)移除一个http header(http请求头); | |
-A "string" --user-agent "string" |
(HTTP)设置Http请求头“User-Agent”,服务器通过“User-Agent”可以判断客户端使用的浏览器名称和操作系统类型,伪造此参数能导致服务器做出错误判断。
| |
-e <URL> --referer <URL> |
(HTTP)设置访问时的来源页面,告诉http服务从哪个页面进入到此页面;
| |
|
||
|
||
|
||
|
|
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
命令 | 描述 |
---|---|
相关方法: