在我使用它们的有限时间里, 一直wget==文件下载器==curl, 但是见许多REST文档中都拿curl做例子,便man curl, 发现其简介如下:
curl is a tool to transfer data from or to a server, using one of the supported
protocols (HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or FILE).
The command is designed to work without user interaction.
curl offers a busload of useful tricks like proxy support, user authentication,
FTP upload, HTTP post, SSL connections, cookies, file transfer resume and more.
As you will see below, the number of features will make your head spin!
curl is powered by libcurl for all transfer-related features. See libcurl(3) for
details.
英文浅显易懂, 我想: 功能这么强大, 估计又难免记忆一大堆参数(痛苦)
大家是如何用的?
Linux纯命令行-Server
man curl
man wget
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
个人行为:
wget一般用于下载文件
curl一般用于模拟请求,测试api
wget: 下载利器
下载速率慢的资源,浏览器经常会没下完就当完成了。建议加
-T5批量下 HTML 文档:
wget -T 5 -t 10 -Q 500m -nH -r -E -l inf -k -p -np URL批量下 URL:
wget -i URL列表文件curl: 调试利器
简单好用,随处可得
浏览器的开发者工具支持复制为 curl 请求