curl的使用

來源:互聯網
上載者:User

標籤:ica   resume   basic   iat   pass   ldap   哪些   連結   pop   

由於在項目組中使用到了curl這個開源庫,於是很想對這個開源庫剖析一下,看看裡面都有哪些東西~

curl開源項目維護了很多年,現在依然在不斷的維護和完善,提供網路請求的命令列工具和函數庫;支援的協議有: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.如此可見,它是多麼的強大。

使用的方式:1:在命令列中,通過curl命令加一些參數,就可以下載一些網路資源。

      2:在項目中,通過引入libcurl,簡化網路請求的操作:

        1):通過easy的介面去使用,easy結構是同步的,效率比較搞,比較容易使用,很多基於同步的網路請求應用程度都是基於這個編寫的。參考URL連結:https://curl.haxx.se/libcurl/c/libcurl-easy.html

        2):通過multi介面是使用,這種方式是非同步,同時支援多線程操作;multi的介面為:https://curl.haxx.se/libcurl/c/libcurl-multi.html

curl的使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.