curl使用教程

上传文件

https://www.cnblogs.com/wangbingbing/p/16596851.html

普通POST文件

1
curl -F 'file=@img-cls.tar.gz' http://127.0.0.1/hfs-upload/

带密码认证的POST

1
curl -u user:password -F file=@info.csv http://127.0.0.1/hfs-upload/

下载文件选项

选项 | 作用 |

|------------------|-------------------|

-O | 直接按链接地址最后一部分文件名保存 |
-o | 指定文件名保存 |
-b | 指定cookies |
-A | 设置UA |
-I | 只请求header |
-i | header和内容都显示 |
-L | 自动追踪重定向 |
-J | 从header中解析文件名 |

curl使用教程
https://jcdu.top/2023/09/30/curl使用教程/
作者
horizon86
发布于
2023年9月30日
许可协议