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 http://www.example.com
curl http://www.example.com > example.html
-o/--output 把输出写到该文件中
curl http://www.example.com -o example.html
POST/GET上传数据
curl http://www.example.com -d 'uid=1&gid=1'
curl http://www.example.com?uid=1
curl 'http://www.example.com?uid=1&gid=1'
-x/--proxy <host[:port]>使用代理
curl -x proxy_host:proxy_port http://www.example.com
本文介绍了curl这一强大的工具,它能够通过命令行方式从或向服务器传输数据。curl支持多种协议如HTTP、HTTPS等,并且可以进行POST/GET请求、使用代理等操作。文中还列举了curl的一些常见用法。

被折叠的 条评论
为什么被折叠?



