CURL的功能很强大, 一本书可能都写不完?
====
curl is a tool to transfer data from or to a server, using one of the sup‐
ported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS,
LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS,
TELNET and TFTP). The command is designed to work without user interaction.
====
curl -v https://x.com
curl -w "time_namelookup: %{time_namelookup}\n time_connect: %{time_connect}\n time_appconnect: %{time_appconnect}\n time_pretransfer: %{time_pretransfer}\n time_redirect: %{time_redirect}\n time_starttransfer: %{time_starttransfer}\n time_total: %{time_total}\n"
curl --cacert
-F, --form
(HTTP) This lets curl emulate a filled-in form in which a user has
pressed the submit button. This causes curl to POST data using the
Content-Type multipart/form-data according to RFC 2388. This enables
uploading of binary files etc. To force the 'content' part to be a
file, prefix the file name with an @ sign. To just get the content
part from a file, prefix the file name with the symbol <. The dif‐
ference between @ and < is then that @ makes a file get attached in
the post as a file upload, while the < makes a text field and just
get the contents for that text field from a file.
可以模仿用户登录表单
-----
--oauth2-bearer 还可以模仿oauth2的访问, 太完美了
-T, --upload-file
--trace
-u, --user
-v, --verbose
-w, --write-out