cURL

維基百科,自由的百科全書
跳至導覽 跳至搜尋

cURL
File:Curl-logo.svg
curl -O的輸出結果
curl -O的輸出結果
原作者丹尼爾·斯坦伯格
首次釋出1997[1]
目前版本
    Module:EditAtWikidata第29行Lua錯誤:attempt to index field 'wikibase' (a nil value)
    原始碼庫
    • {{URL|example.com|可选的显示文本}}
    Module:EditAtWikidata第29行Lua錯誤:attempt to index field 'wikibase' (a nil value)
    程式語言C
    引擎
      Module:EditAtWikidata第29行Lua錯誤:attempt to index field 'wikibase' (a nil value)
      作業系統跨平台
      類型FTP / HTTP
      授權條款自由軟體:MIT/X derivate license
      網站curl.se

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

      cURL只涉及網路傳輸,不涉及對具體資料的具體處理(如:html的渲染等)。

      歷史[編輯]

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

      組件[編輯]

      libcurl[編輯]

      libcurl是一個客戶端URL傳輸庫,支援cookieDICTFTPFTPSGopherHTTP(包括HTTP/2HTTP/3)、HTTP代理、HTTPSIMAPKerberosLDAPMQTTPOP3RTSPRTMPSCPSMTPSMB。該庫支援檔案URI方案、SFTPTelnetTFTP、檔案傳輸恢復、FTP 上傳、基於 HTTP 表單的上傳、HTTPS 憑證、LDAPS、代理和使用者增強密碼身分驗證。

      libcurl 庫支援GnuTLSmbed TLSNSSIBM i 上的 GSKit、Windows 上的 SSPImacOSiOS 上的 Secure Transport、OpenSSLBoringSSLLibreSSL、AmiSSL、wolfSSL、BearSSL 和 Rustls英語Rustls 的 SSL/TLS。[6]

      curl[編輯]

      curl是一個用於取得和傳送資料的命令列工具,使用URL語法。curl提供了一個libcurl的介面,它支援所有libcurl支援的協定。

      例子[編輯]

      簡單模式:

      $ 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 http://example.com/
      $ curl -L http://example.com/
      

      參見[編輯]

      外部連結[編輯]

      參考資料[編輯]

      1. ^ cURL History Page. [2012-05-01]. (原始內容存檔於2012-04-23). 
      2. ^ What does curl do?. ec.haxx.se. [2020-01-27]. (原始內容存檔於2020-01-27). 
      3. ^ cURL必知必会-图书-图灵社区. www.ituring.com.cn. [2020-01-27]. (原始內容存檔於2018-09-28). 
      4. ^ cURL: docs/HISTORY.md | Fossies. fossies.org. [2019-09-29]. (原始內容存檔於2019-09-29). 
      5. ^ Changelog. 2020-01-04 [2020-01-04]. (原始內容存檔於2020-01-05) (English). The first curl release. The tool was named urlget before this. And httpget before that. 
      6. ^ curl supports rustls | daniel.haxx.se. [2022-07-09]. (原始內容存檔於2022-08-09) (en-US).