curl学习

引言

之前好多脚本中使用到了curl,比如使用curl获取API数据,curl POST提交数据到服务器等等。
curl工具确实非常有用,下面引用官网内容进行下简介,也方便之后使用时查阅。

curl是什么?

curl is an open source command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMTP, SMTPS, Telnet and TFTP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, HTTP/2, cookies, user+password authentication (Basic, Plain, Digest, CRAM-MD5, NTLM, Negotiate and Kerberos), file transfer resume, proxy tunneling and more.

curl是一个用带URL语法来进行数据传输的开源命令行工具和库,支持非常多的协议。

curl用于什么?

curl is used in command lines or scripts to transfer data. It is also used in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players and is the internet transfer backbone for thousands of software applications totally affecting more than one billion users.

curl文档

curl的各种文档

使用实例暂时就不在这里列举了。 使用时可参考man page中的例子。

Ref

curl官网
cURL - How To Use
curl 简单入门