CURL: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Krinkle
mNo edit summary
imported>Noukkis
Undid revision 1328009853 by ~2025-41151-66 (talk)
 
Line 1: Line 1:
{{Short description|Free URL data transfer client software}}
{{Short description|Free URL data transfer client software}}
{{confused|Curl (programming language)}}
{{Other uses|Curl (disambiguation){{!}}Curl}}
{{Other uses|Curl (disambiguation){{!}}Curl}}
{{confused|Curl (programming language)}}
{{lowercase title}}
{{lowercase title}}
{{Infobox software
{{Infobox software
Line 14: Line 14:
| latest preview date = {{wikidata|qualifier|preferred|single|Q286306|P348|P548=Q51930650|P577}}
| latest preview date = {{wikidata|qualifier|preferred|single|Q286306|P348|P548=Q51930650|P577}}
| programming language = [[C (programming language)|C]]
| programming language = [[C (programming language)|C]]
| platform = [[Cross-platform software|Cross-platform]]
| platform = 29 platforms (see {{section link || libcurl}} for details)
| genre = [[web client]] (supports e.g. [[HTTPS]], and [[FTP client|FTP]])
| genre = [[Web client]] (supports e.g. [[HTTPS]], and [[FTP client|FTP]])
| license = curl license<ref name="spdx">{{cite web|url=https://spdx.org/licenses/curl.html|title=curl License|website=spdx.org}}</ref><ref name="license">{{cite web|url=https://curl.se/docs/copyright.html|title=curl - copyright|website=curl.se|access-date=2024-01-17|url-status=live|archive-url=https://web.archive.org/web/20240115151446/https://curl.se/docs/copyright.html|archive-date=2024-01-15}}</ref> (inspired on the [[MIT License]]<ref name="license"></ref>), also [[ISC license|ISC]], [[BSD licenses|3-clause BSD]], [[BSD licenses|4-clause BSD]]<ref name="licenses">{{cite web |url=https://github.com/curl/curl/commit/ad9bc5976d6661cd5b03ebc379313bf657701c14 |title=Commit "copyright: make repository REUSE compliant" |work=GitHub.com |date=June 13, 2022 |first1=Max |last1=Mehl |first2=Daniel |last2=Stenberg}}</ref>
| license = curl license<ref name="spdx">{{cite web|url=https://spdx.org/licenses/curl.html|title=curl License|website=spdx.org}}</ref><ref name="license">{{cite web|url=https://curl.se/docs/copyright.html|title=curl - copyright|website=curl.se|access-date=2024-01-17|url-status=live|archive-url=https://web.archive.org/web/20240115151446/https://curl.se/docs/copyright.html|archive-date=2024-01-15}}</ref> (inspired by the [[MIT License]]<ref name="license"/>) and a fraction uses the [[ISC license|ISC]]
| website = {{Official URL}}
}}
}}
 
'''cURL''' (pronounced like "curl",<ref name = "FAQ, haxx.se" /> {{IPAc-en|k|ɜːr|l}}) is a [[Free and open-source software|free and open source]] [[Command-line interface|CLI]] app for [[uploading]] and [[downloading]] individual files. It can download a [[URL]] from a [[web server]] over [[HTTP]], and supports a variety of other [[Application layer|network protocols]], [[Uniform Resource Identifier|URI]] schemes, multiple versions of HTTP, and [[Proxy server|proxying]]. The project consists of a [[library (computing)|library]] ('''libcurl''') and [[command-line tool]] ('''curl'''), which have been widely ported to different [[Computing platform|computing platforms]]. It was created by [[Daniel Stenberg]], who is still the lead developer of the project.
'''cURL''' (pronounced like "curl",<ref name = "FAQ, haxx.se" /> {{IPAc-en|k|ɜːr|l}}) is a [[Free and open-source software|free and open source]] computer program for transferring data to and from [[Internet]] servers. It can download a [[URL]] from a [[web server]] over [[HTTP]], and supports a variety of other [[Application layer|network protocols]], [[Uniform Resource Identifier|URI]] schemes, multiple versions of HTTP, and [[Proxy server|proxying]]. The project consists of both a [[library (computing)|library]] ('''libcurl''') and [[command-line tool]] ('''curl'''), which have been widely ported to different [[Computing platform|computing platforms]].
 
It was created by [[Daniel Stenberg]], who is still the lead developer of the project.


==History==
==History==
The software was first released in 1996,<ref name="RelFirst">{{cite web |title=History of curl |url=https://curl.se/docs/history.html |url-status=live |archive-url=https://web.archive.org/web/20210917071434/https://curl.se/docs/history.html |archive-date=September 17, 2021 |access-date=May 11, 2021 |publisher=fossies.org |language=en-US}} </ref> originally named ''httpget'' and then became ''urlget'', before adopting the current name of curl.<ref name = "cURL changelog, 2020" /><ref name = "Stenberg, Haxx SE, 2020" /> The name stands for "Client for [[URL]]".<ref name="Stenberg, haxx.se, 2018" /> The original author and lead developer is the Swedish developer [[Daniel Stenberg]], who created curl to power part of an [[IRC bot]], because he wanted to automatically provide currency exchange rates, fetched from a website, to users in an [[Internet_Relay_Chat|IRC]] [[chat room]].<ref name=history/>
The software was first released in 1996,<ref name="RelFirst">{{cite web |title=History of curl |url=https://curl.se/docs/history.html |url-status=live |archive-url=https://web.archive.org/web/20210917071434/https://curl.se/docs/history.html |archive-date=September 17, 2021 |access-date=May 11, 2021 |publisher=fossies.org |language=en-US}} </ref> originally named <code>httpget</code> and then became <code>urlget</code>, before adopting the current name of <code>curl</code>.<ref name = "cURL changelog, 2020" /><ref name = "Stenberg, Haxx SE, 2020" /> The name stands for "Client for [[URL]]".<ref name="Stenberg, haxx.se, 2018" /> The original author and lead developer is the Swedish developer [[Daniel Stenberg]], who created curl to power part of an [[IRC bot]], because he wanted to automatically provide currency exchange rates, fetched from a website, to users in an [[Internet_Relay_Chat|IRC]] [[chat room]].<ref name=history/>


== Components ==
== Components ==


=== libcurl ===
=== libcurl ===
libcurl is a client-side URL transfer [[Library (computing)|library]] that powers curl,<ref name="BlueOne" /> supporting [[DICT]], [[FTP]], [[FTPS]], [[Gopher (protocol)|Gopher]], [[HTTP|HTTP/1]]<ref name = "Stenberg, GitHub, 2019" /> (with [[HTTP/2]] and [[HTTP/3]] support), [[cookie (web)|HTTP cookie]]s, [[HTTP POST]], [[HTTP PUT]], [[HTTP proxy]] tunneling, [[HTTPS]], [[IMAP]], [[Kerberos (protocol)|Kerberos]], [[LDAP]], [[MQTT]], [[POP3]], [[RTSP]], [[Real-Time Messaging Protocol|RTMP]], [[Secure copy|SCP]], [[SMTP]], and [[Server Message Block|SMB]]. The library supports the [[file URI scheme]], [[SSH File Transfer Protocol|SFTP]], [[Telnet]], [[Trivial File Transfer Protocol|TFTP]], file transfer resume, FTP uploading, HTTP form-based upload, HTTPS certificates, LDAPS, proxies, and user-plus-password authentication.<ref name=curl1>{{cite web |title=curl - How To Use |url=https://curl.se/docs/manpage.html |website=curl.se}}</ref>
<code>libcurl</code> is a client-side URL transfer [[Library (computing)|library]] that powers <code>curl</code>.<ref name="BlueOne" /> It supports numerous internet protocols including [[DICT]], [[file URI scheme|FILE]], [[FTP]], [[FTPS]], [[Gopher (protocol)|GOPHER]], [[GOPHERS]], [[HTTP]], [[HTTPS]], [[IMAP]], [[IMAPS]], [[LDAP]], [[LDAPS]], [[MQTT]], [[POP3]], [[POP3S]], [[Real-Time_Messaging_Protocol|RTMP]], [[RTMPS]], [[RTSP]], [[Secure copy protocol|SCP]], [[SSH File Transfer Protocol|SFTP]], [[Server Message Block|SMB]], [[Server Message Block#SMB_3.1.1|SMBS]], [[SMTP]], [[SMTPS]], [[TELNET]], [[Trivial File Transfer Protocol|TFTP]], [[WebSocket|WS]] and [[WebSocket|WSS]].


The libcurl library is portable, as it builds and works identically on most platforms, including [[AIX]], [[AmigaOS]], [[Android (operating system)|Android]],{{Citation needed|date=April 2022}} [[BeOS]], [[BlackBerry Tablet OS]] and [[BlackBerry 10]],<ref name = "Blackberry, GitHub" /> [[OpenVMS]], [[Darwin (operating system)|Darwin]], [[DOS]], [[FreeBSD]], [[HP-UX]], [[HURD]], [[iOS]], [[IRIX]], [[Linux]], [[macOS]], [[NetBSD]], [[NetWare]], [[OpenBSD]], [[OS/2]], [[QNX Neutrino]], [[RISC OS]], [[Solaris (operating system)|Solaris]], [[Symbian]], [[Tru64]], [[Ultrix]], [[UnixWare]], [[Microsoft Windows]] and [[OpenHarmony]].<ref>{{cite web |title=Third-party open-source software Curl |url=https://gitee.com/openharmony/third_party_curl |website=Gitee |publisher=OpenAtom OpenHarmony |access-date=17 March 2024}}</ref><ref>{{cite web |title=Third-party open-source software Curl |url=https://github.com/openharmony/third_party_curl |website=GitHub |publisher=OpenAtom OpenHarmony |access-date=17 March 2024}}</ref><ref name = "Microsoft Techcommunity" />
libcurl supports [[HTTP]] versions 0.9, 1.0, 1.1, [[HTTP/2]] and [[HTTP/3]] including h2c, prior-knowledge, dual-connect modes, and [[QUIC]] with 0-RTT handshakes.


The libcurl library is [[thread-safe]] and [[IPv6]] compatible. [[Language binding|Bindings]] are available for more than 50 [[computer languages|languages]], including [[C (programming language)|C]]/[[C++]], [[Java (programming language)|Java]], [[Julia (programming language)|Julia]] (is bundled with), [[PHP]] and [[Python (programming language)|Python]].<ref>{{cite web|url=https://curl.se/libcurl/bindings.html|title=libcurl bindings|publisher=curl.se}}</ref>
The library provides features such as [[cookie (web)|cookie]] handling, standard HTTP request methods ([[HTTP_GET|GET]], [[POST_(HTTP)|POST]], [[HTTP_PUT|PUT]], [[HTTP_HEAD|HEAD]], multipart form uploads), and authentication mechanisms including Basic, Digest, [[NTLM]], Negotiate, [[CRAM-MD5]], SCRAM-SHA, Kerberos, Bearer tokens, AWS Sigv4, [[Simple_Authentication_and_Security_Layer|SASL]], and reading credentials from .netrc.


The libcurl library supports [[GnuTLS]], [[mbed TLS]], [[Network Security Services|NSS]], {{proper name|[[GSKit]]}} on [[IBM i]], [[Security Support Provider Interface|SChannel]] on Windows, [[Secure Transport]] on macOS and iOS, [[Transport Layer Security|SSL/TLS]] through [[OpenSSL]], [[BoringSSL]], [[libreSSL]], [[AmiSSL]], [[wolfSSL]], [[BearSSL]] and {{proper name|[[rustls]]}}.<ref>{{Cite web|title=curl supports rustls {{!}} daniel.haxx.se|date=9 February 2021 |url=https://daniel.haxx.se/blog/2021/02/09/curl-supports-rustls/|access-date=2022-01-01|language=en-US}}</ref>
<code>libcurl</code> supports a variety of security and transport features, including [[Transport_Layer_Security|TLS]] [[TLS_1.0|1.0]]-[[TLS_1.3|1.3]], mutual authentication, [[Opportunistic_TLS|STARTTLS]], [[OCSP stapling]], [[Encrypted Client Hello]] ([[Encrypted Client Hello|ECH]]), False Start, key pinning, [[Post-quantum_cryptography|post-quantum]] readiness, session resumption, early data, session import/export, [[HTTP_Strict_Transport_Security|HSTS]], Alt-Svc, [[Public Suffix List]] ([[Public Suffix List|PSL]]), [[HTTP_ETag|entity tags]] ([[HTTP_ETag|ETags]]), range requests, transfer compression ([[gzip]], [[Brotli]], [[zstd]]), custom headers, custom methods, and redirect following.
 
It also offers proxy and networking support, including [[SOCKS4]], [[SOCKS5]], [[HAProxy]], and [[HTTP proxy|HTTP proxies]] with chaining and [[Unix domain sockets]], as well as user-plus-password authentication<ref name=curl1>{{cite web |title=curl - How To Use |url=https://curl.se/docs/manpage.html |website=curl.se}}</ref>. Advanced name-resolution features include [[DNS-over-HTTPS]], custom [[DNS]] servers, host/port mappings, and DNS caching.
 
Additional functionality includes file transfer resume, [[FTP]] uploading, form-based [[HTTP]] upload, [[HTTPS]] certificates, and mechanisms for controlling and monitoring transfers such as configurable timeouts, automatic retries, rate limiting, and detection of stalled connections. The library also provides enhanced reporting features, including JSON-formatted metadata, content-disposition handling, [[Internationalized_domain_name|IDN]] hostname display, and customizable transfer information.
 
The <code>libcurl</code> library is portable, as it builds and works identically on most platforms, including:<ref>{{cite web |title=Third-party open-source software Curl |url=https://gitee.com/openharmony/third_party_curl |website=Gitee |publisher=OpenAtom OpenHarmony |access-date=17 March 2024}}</ref><ref>{{cite web |title=Third-party open-source software Curl |url=https://github.com/openharmony/third_party_curl |website=GitHub |publisher=OpenAtom OpenHarmony |access-date=17 March 2024}}</ref><ref name = "Windows Command Line blog" />
{{div col|colwidth=10em}}
* [[AIX]]
* [[AmigaOS]]
* [[Android (operating system)|Android]]{{Citation needed|date=April 2022}}
* [[Azure_Sphere|Azure Sphere OS]]
* [[BeOS]]
* [[BlackBerry Tablet OS]] and [[BlackBerry 10]]<ref name = "Blackberry, GitHub" />
* Cesium
* [[Darwin (operating system)|Darwin]]
* [[DOS]]
* [[Deos]]
* [[FreeBSD]]
* [[FreeRTOS]]
* [[HP-UX]]
* [[HURD]]
* [[iOS]]
* [[IRIX]]
* [[Linux]]
* [[macOS]]
* [[NetBSD]]
* [[NetWare]]
* [[OpenBSD]]
* [[OpenHarmony]]
* [[OpenVMS]]
* [[OS/2]]
* [[QNX]]
* [[QNX Neutrino]]
* [[RISC OS]]
* [[RTEMS]]
* [[Solaris (operating system)|Solaris]]
* [[Symbian]]
* [[Tru64]]
* [[Ultrix]]
* [[UnixWare]]
* [[Windows]]
* [[VxWorks]]
* [[Zephyr_(operating system)|Zephyr]]
{{div col end}}
 
The <code>libcurl</code> library is [[thread-safe]] and [[IPv6]] compatible. [[Language binding|Bindings]] are available for more than 50 [[computer languages|languages]], including [[C (programming language)|C]], [[C++]], [[Java (programming language)|Java]], [[Julia (programming language)|Julia]] (is bundled with), [[PHP]] and [[Python (programming language)|Python]].<ref>{{cite web|url=https://curl.se/libcurl/bindings.html|title=libcurl bindings|publisher=curl.se}}</ref>
 
The <code>libcurl</code> library supports [[Transport Layer Security|SSL/TLS]] through [[GnuTLS]], [[mbedTLS]], [[Security Support Provider Interface|SChannel]] (on Windows), [[OpenSSL]], [[BoringSSL]], [[AWS-LC]], [[QuicTLS]], [[LibreSSL]], [[AmiSSL]], [[wolfSSL]] and {{proper name|[[rustls]]}}.<ref>{{Cite web|title=curl supports rustls {{!}} daniel.haxx.se|date=9 February 2021 |url=https://daniel.haxx.se/blog/2021/02/09/curl-supports-rustls/|access-date=2022-01-01|language=en-US}}</ref>


=== curl ===
=== curl ===
curl is a command-line tool for getting or sending data including files using [[URL]] syntax. curl provides an interface to the libcurl library; it supports every protocol libcurl supports.<ref name=curl1/>
<code>curl</code> is a command-line tool for getting or sending data, including files, using [[URL]] syntax. <code>curl</code> provides an interface to the <code>libcurl</code> library; it supports every protocol <code>libcurl</code> supports.<ref name=curl1/>
 
<code>curl</code> supports [[HTTPS]], and performs SSL or TLS certificate verification by default.  When <code>curl</code> connects to a remote server via HTTPS, it will obtain the remote server certificate, then checks against its [[CA certificate]] store the validity of the remote server to ensure the remote server is the one it claims to be.  Some <code>curl</code> packages are bundled with a CA certificate store file.  There are several options to specify a CA certificate, such as <code>--cacert</code> and <code>--capath</code>. The <code>--cacert</code> option can be used to specify the location of the CA certificate store file.
 
Starting with Windows 10 version 1809, Windows ships with <code>curl.exe</code>.<ref name = "Windows Command Line blog"  /> On Microsoft Windows, if a CA certificate file is not specified, curl will look for the <code>curl-ca-bundle.crt</code> file in the following locations, in the order given:<ref name="SSL, haxx.se" />
# App's folder (where <code>curl.exe</code> is located)
# Current working directory
# <code>C:\Windows\System32</code> directory
# <code>C:\Windows</code> directory
# Directories specified in the [[PATH (variable)|<code>PATH</code>]] environment variable
 
<code>curl</code> will return an error message if the remote server is using a self-signed certificate, or if the remote server certificate is not signed by a CA listed in the CA cert file. <code>-k</code> or <code>--insecure</code> option can be used to skip certificate verification. Alternatively, if the remote server is trusted, the remote server CA certificate can be added to the CA certificate store file.
 
===tiny-curl===
<code>tiny-curl</code> is a lightweight version of libcurl developed by wolfSSL Inc. for embedded and resource-constrained devices. It implements HTTPS functionality in roughly 100 KB of code on typical 32-bit architectures.


curl supports [[HTTPS]] and performs SSL certificate verification by default when a secure protocol is specified such as HTTPS. When curl connects to a remote server via HTTPS, it will obtain the remote server certificate, then check against its [[CA certificate]] store the validity of the remote server to ensure the remote server is the one it claims to be.  Some curl packages are bundled with CA certificate store file.  There are several options to specify a CA certificate such as {{mono|--cacert}} and {{mono|--capath}}. The {{mono|--cacert}} option can be used to specify the location of the CA certificate store file.  In the Windows platform, if a CA certificate file is not specified, curl will look for a CA certificate file name “curl-ca-bundle.crt” in the following order:
==Licensing==
# Directory where the curl program is located.
curl and libcurl are distributed under the MIT License. tiny-curl, a version of curl optimized for embedded systems and supported by wolfSSL, is available under both the [[GNU General Public License|GNU GPLv3-or-later]] and commercial licensing.
# Current working directory.
# Windows system directory.
# Windows directory.
# Directories specified in the %PATH% environment variables.<ref name = "SSL, haxx.se" />


curl will return an error message if the remote server is using a self-signed certificate, or if the remote server certificate is not signed by a CA listed in the CA cert file. {{mono|-k}} or {{mono|--insecure}} option can be used to skip certificate verification.  Alternatively, if the remote server is trusted, the remote server CA certificate can be added to the CA certificate store file.
Rock-solid curl<ref>{{Cite web |url=https://rock-solid.curl.dev/ |title=Rock-solid curl}}</ref>, the long-term support (LTS) edition, uses the same curl license by default, with an option for commercial licensing for organizations that require contractual support or warranty coverage.


==See also==
==See also==
Line 65: Line 119:
<ref name = "Stenberg, haxx.se, 2018" >{{Cite web|url=https://everything.curl.dev/project/name|title=Origin of the name|last=Stenberg|first=Daniel|website=curl.se|language=en|access-date=2021-03-27}}</ref>
<ref name = "Stenberg, haxx.se, 2018" >{{Cite web|url=https://everything.curl.dev/project/name|title=Origin of the name|last=Stenberg|first=Daniel|website=curl.se|language=en|access-date=2021-03-27}}</ref>
<ref name="BlueOne">{{cite web|title=Conversing through the Internet with cURL and libcurl - Using libcurl with C and Python|url=https://www.ibm.com/developerworks/library/os-curl/index.html|website=IBM Developerworks|access-date=12 September 2018|first=M. Tim|last=Jones|date=8 September 2009|url-status=live|archive-date=14 April 2015|archive-url=https://web.archive.org/web/20150414143804/https://www.ibm.com/developerworks/library/os-curl/index.html|df=dmy-all}}</ref>
<ref name="BlueOne">{{cite web|title=Conversing through the Internet with cURL and libcurl - Using libcurl with C and Python|url=https://www.ibm.com/developerworks/library/os-curl/index.html|website=IBM Developerworks|access-date=12 September 2018|first=M. Tim|last=Jones|date=8 September 2009|url-status=live|archive-date=14 April 2015|archive-url=https://web.archive.org/web/20150414143804/https://www.ibm.com/developerworks/library/os-curl/index.html|df=dmy-all}}</ref>
<ref name = "Stenberg, GitHub, 2019" > {{ Cite web | url = https://github.com/curl/curl/pull/4191/commits/2723285b39a19151808c92efa859d3afae46898e | title = http09: disable HTTP/0.9 by default in both tool and library | access-date = 5 August 2019 | author-link = Daniel Stenberg | date = 5 August 2019 | website = [[GitHub]] | quote = As the plan has been laid out in Deprecated. Update docs accordingly and verify in test 1174. | format = html | archive-url = https://web.archive.org/web/20190805160316/https://github.com/curl/curl/pull/4191/commits/2723285b39a19151808c92efa859d3afae46898e | archive-date = 5 August 2019  | df = dmy-all | first = Daniel | last = Stenberg }} </ref>
<ref name = "Blackberry, GitHub" >{{Cite web |url=https://blackberry.github.com/ndk/components.html |title=Open Source Components for the Native SDK for BlackBerry Tablet OS |access-date=2017-09-19 |archive-url=https://web.archive.org/web/20130127102233/http://blackberry.github.com/ndk/components.html |archive-date=2013-01-27 |url-status=dead }}</ref>
<ref name = "Blackberry, GitHub" >{{Cite web |url=https://blackberry.github.com/ndk/components.html |title=Open Source Components for the Native SDK for BlackBerry Tablet OS |access-date=2017-09-19 |archive-url=https://web.archive.org/web/20130127102233/http://blackberry.github.com/ndk/components.html |archive-date=2013-01-27 |url-status=dead }}</ref>
<ref name = "Microsoft Techcommunity" >{{Cite web|url=https://techcommunity.microsoft.com/t5/containers/tar-and-curl-come-to-windows/ba-p/382409|title=Tar and Curl Come to Windows!|date=March 22, 2019|website=techcommunity.microsoft.com}}</ref>
<ref name = "Windows Command Line blog" >{{Cite web |first=Rich |last=Turner |url=https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/ |title=Tar and Curl Come to Windows! |date=18 January 2018 |website=Windows Command Line |publisher=[[Microsoft]]}}</ref>
<ref name = "SSL, haxx.se" >{{Cite web|url=https://curl.se/docs/sslcerts.html|title=curl - SSL CA Certificates|website=curl.se}}</ref>
<ref name = "SSL, haxx.se" >{{Cite web|url=https://curl.se/docs/sslcerts.html|title=curl - SSL CA Certificates|website=curl.se}}</ref>
<ref name = "cURL changelog, 2020" > {{ Cite web | url = https://curl.se/changes.html#4_0 | title = Changelog | access-date = 2020-01-04 | date = 2020-01-04 | quote = The first curl release. The tool was named urlget before this. And httpget before that.  | language = en | df = dmy-all }} </ref>
<ref name = "cURL changelog, 2020" > {{ Cite web | url = https://curl.se/changes.html#4_0 | title = Changelog | access-date = 2020-01-04 | date = 2020-01-04 | quote = The first curl release. The tool was named urlget before this. And httpget before that.  | language = en | df = dmy-all }} </ref>

Latest revision as of 14:21, 17 December 2025

Template:Short description Script error: No such module "Distinguish". Script error: No such module "other uses".

Script error: No such module "Infobox". Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters". cURL (pronounced like "curl",[1] Script error: No such module "IPAc-en".) is a free and open source CLI app for uploading and downloading individual files. It can download a URL from a web server over HTTP, and supports a variety of other network protocols, URI schemes, multiple versions of HTTP, and proxying. The project consists of a library (libcurl) and command-line tool (curl), which have been widely ported to different computing platforms. It was created by Daniel Stenberg, who is still the lead developer of the project.

History

The software was first released in 1996,[2] originally named httpget and then became urlget, before adopting the current name of curl.[3][4] The name stands for "Client for URL".[5] The original author and lead developer is the Swedish developer Daniel Stenberg, who created curl to power part of an IRC bot, because he wanted to automatically provide currency exchange rates, fetched from a website, to users in an IRC chat room.[6]

Components

libcurl

libcurl is a client-side URL transfer library that powers curl.[7] It supports numerous internet protocols including DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS.

libcurl supports HTTP versions 0.9, 1.0, 1.1, HTTP/2 and HTTP/3 including h2c, prior-knowledge, dual-connect modes, and QUIC with 0-RTT handshakes.

The library provides features such as cookie handling, standard HTTP request methods (GET, POST, PUT, HEAD, multipart form uploads), and authentication mechanisms including Basic, Digest, NTLM, Negotiate, CRAM-MD5, SCRAM-SHA, Kerberos, Bearer tokens, AWS Sigv4, SASL, and reading credentials from .netrc.

libcurl supports a variety of security and transport features, including TLS 1.0-1.3, mutual authentication, STARTTLS, OCSP stapling, Encrypted Client Hello (ECH), False Start, key pinning, post-quantum readiness, session resumption, early data, session import/export, HSTS, Alt-Svc, Public Suffix List (PSL), entity tags (ETags), range requests, transfer compression (gzip, Brotli, zstd), custom headers, custom methods, and redirect following.

It also offers proxy and networking support, including SOCKS4, SOCKS5, HAProxy, and HTTP proxies with chaining and Unix domain sockets, as well as user-plus-password authentication[8]. Advanced name-resolution features include DNS-over-HTTPS, custom DNS servers, host/port mappings, and DNS caching.

Additional functionality includes file transfer resume, FTP uploading, form-based HTTP upload, HTTPS certificates, and mechanisms for controlling and monitoring transfers such as configurable timeouts, automatic retries, rate limiting, and detection of stalled connections. The library also provides enhanced reporting features, including JSON-formatted metadata, content-disposition handling, IDN hostname display, and customizable transfer information.

The libcurl library is portable, as it builds and works identically on most platforms, including:[9][10][11]

<templatestyles src="Div col/styles.css"/>

The libcurl library is thread-safe and IPv6 compatible. Bindings are available for more than 50 languages, including C, C++, Java, Julia (is bundled with), PHP and Python.[13]

The libcurl library supports SSL/TLS through GnuTLS, mbedTLS, SChannel (on Windows), OpenSSL, BoringSSL, AWS-LC, QuicTLS, LibreSSL, AmiSSL, wolfSSL and Template:Proper name.[14]

curl

curl is a command-line tool for getting or sending data, including files, using URL syntax. curl provides an interface to the libcurl library; it supports every protocol libcurl supports.[8]

curl supports HTTPS, and performs SSL or TLS certificate verification by default. When curl connects to a remote server via HTTPS, it will obtain the remote server certificate, then checks against its CA certificate store the validity of the remote server to ensure the remote server is the one it claims to be. Some curl packages are bundled with a CA certificate store file. There are several options to specify a CA certificate, such as --cacert and --capath. The --cacert option can be used to specify the location of the CA certificate store file.

Starting with Windows 10 version 1809, Windows ships with curl.exe.[11] On Microsoft Windows, if a CA certificate file is not specified, curl will look for the curl-ca-bundle.crt file in the following locations, in the order given:[15]

  1. App's folder (where curl.exe is located)
  2. Current working directory
  3. C:\Windows\System32 directory
  4. C:\Windows directory
  5. Directories specified in the PATH environment variable

curl will return an error message if the remote server is using a self-signed certificate, or if the remote server certificate is not signed by a CA listed in the CA cert file. -k or --insecure option can be used to skip certificate verification. Alternatively, if the remote server is trusted, the remote server CA certificate can be added to the CA certificate store file.

tiny-curl

tiny-curl is a lightweight version of libcurl developed by wolfSSL Inc. for embedded and resource-constrained devices. It implements HTTPS functionality in roughly 100 KB of code on typical 32-bit architectures.

Licensing

curl and libcurl are distributed under the MIT License. tiny-curl, a version of curl optimized for embedded systems and supported by wolfSSL, is available under both the GNU GPLv3-or-later and commercial licensing.

Rock-solid curl[16], the long-term support (LTS) edition, uses the same curl license by default, with an option for commercial licensing for organizations that require contractual support or warranty coverage.

See also

Script error: No such module "Portal".

  • curl-loader – an open-source testing tool based on curl
  • libwww – an early library that comes with a command line interface
  • PowerShell – the iwr (Invoke-WebRequest) Windows PowerShell had functionality similar to curl; class Web-client too.[17]
  • Web crawler – an internet bot that can crawl the web
  • Wget – similar command-line tool with no associated library but capable of recursive downloading

References

<templatestyles src="Reflist/styles.css" />

  1. ↑ Script error: No such module "citation/CS1".
  2. ↑ Script error: No such module "citation/CS1".
  3. ↑ Script error: No such module "citation/CS1".
  4. ↑ Script error: No such module "citation/CS1".
  5. ↑ Script error: No such module "citation/CS1".
  6. ↑ Script error: No such module "citation/CS1".
  7. ↑ Script error: No such module "citation/CS1".
  8. ↑ a b Script error: No such module "citation/CS1".
  9. ↑ Script error: No such module "citation/CS1".
  10. ↑ Script error: No such module "citation/CS1".
  11. ↑ a b Script error: No such module "citation/CS1".
  12. ↑ Script error: No such module "citation/CS1".
  13. ↑ Script error: No such module "citation/CS1".
  14. ↑ Script error: No such module "citation/CS1".
  15. ↑ Script error: No such module "citation/CS1".
  16. ↑ Script error: No such module "citation/CS1".
  17. ↑ Script error: No such module "citation/CS1".
Cite error: Script error: No such module "Namespace detect".Script error: No such module "Namespace detect".

Script error: No such module "Check for unknown parameters".

External links

Script error: No such module "Side box".

  • Script error: No such module "Official website".Script error: No such module "Check for unknown parameters".

Script error: No such module "Navbox". Script error: No such module "Navbox".