cURL

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書

cURL
curl -O的輸出結果
curl -O的輸出結果
原作者丹尼爾·斯坦伯格
首次釋出1997[1]
目前版本
  • 8.7.1 (2024年3月27日;穩定版本)[2]
編輯維基數據鏈結
原始碼庫 編輯維基數據鏈結
程式語言C
作業系統跨平台
類型FTP / HTTP
授權條款自由軟體:MIT/X derivate license
網站curl.se

cURL是一個開源專案,主要的產品是curl(命令列工具)和libcurl(C語言的API庫),兩者功能均是:基於網路協定,對指定URL進行網路傳輸。[3][4]

cURL涉及是任何網路協定傳輸,不涉及對具體資料的具體處理(如:html的彩現等)。

歷史[編輯]

cURL最先於1997年釋出[5],當時的專案名稱是 httpget,之後改為 urlget [6]

libcurl[編輯]

libcurl 是一個免費的客戶端 URL 傳輸庫,[7]支援 cookie、DICT、FTP、FTPS、Gopher、HTTP/1(亦支援 HTTP/2 和 HTTP/3)、HTTP POST、HTTP PUT、HTTP 代理隧道、HTTPS、IMAP、Kerberos、LDAP、MQTT、POP3、RTSP、RTMP、SCP、SMTP 和 SMB。該庫支援檔案 URI 方案、SFTP、Telnet、TFTP、檔案傳輸恢復、FTP 上傳、基於 HTTP 表單的上傳、HTTPS 憑證、LDAPS、代理和使用者增強密碼身分驗證。

libcurl 庫支援 GnuTLS、mbed TLS、NSS、IBM i 上的 gskit、Windows 上的 SChannel、macOS 和 iOS 上的 Secure Transport、OpenSSL、Boringssl、libressl、AmiSSL、wolfSSL、BearSSL 和 rustls 的 SSL/TLS。[8]

curl[編輯]

curl 支援的通訊協定有 DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SBMS, SMTP, SMTPS, TELNET 和TFTP。[9]

例子[編輯]

簡單模式:

$ curl http://example.com

詳細(verbose)模式:

$ curl --verbose http://example.com
$ curl -v http://example.com

下載(output):

$ curl --output output.html http://example.com/
$ curl -o output.html http://example.com/

重新導向:(curl預設不會重新導向

$ curl --location output.html http://example.com/
$ curl -L output.html http://example.com/

外部連結[編輯]

參考資料[編輯]

  1. ^ cURL History Page. [2012-05-01]. (原始內容存檔於2012-04-23). 
  2. ^ curl 8.7.0 and 8.7.1 | daniel.haxx.se. 2024年3月27日 [2024年3月27日] (英語). 
  3. ^ What does curl do?. ec.haxx.se. [2020-01-27]. (原始內容存檔於2020-01-27). 
  4. ^ cURL必知必会-图书-图灵社区. www.ituring.com.cn. [2020-01-27]. (原始內容存檔於2018-09-28). 
  5. ^ cURL: docs/HISTORY.md | Fossies. fossies.org. [2019-09-29]. (原始內容存檔於2019-09-29). 
  6. ^ Changelog. 2020-01-04 [2020-01-04]. (原始內容存檔於2020-01-05) (英語). The first curl release. The tool was named urlget before this. And httpget before that. 
  7. ^ IBM Developer. developer.ibm.com. [2022-07-09]. (原始內容存檔於2022-09-01). 
  8. ^ curl supports rustls | daniel.haxx.se. [2022-07-09]. (原始內容存檔於2022-08-09) (美國英語). 
  9. ^ Using curl. ec.haxx.se. [2020-01-27]. (原始內容存檔於2020-01-27).