{{Short description|Free URL data transfer client software}} {{confused|Curl (programming language)}} {{Other uses|Curl (disambiguation){{!}}Curl}} {{lowercase title}} {{Infobox software | name = curl | logo = Curl-logo.svg | author = Daniel Stenberg<ref name=17yearhistory /> | developer = [https://curl.se/docs/thanks.html Contributors to the curl project] | released = {{Start date and age|1996}}<ref name=history /> | latest release version = {{wikidata|property|preferred|reference|edit|Q286306|P348|P548=Q2804309}} | latest release date = {{wikidata|qualifier|preferred|single|Q286306|P348|P548=Q2804309|P577}} | latest preview version = {{wikidata|property|preferred|reference|edit|Q286306|P348|P548=Q51930650}} | latest preview date = {{wikidata|qualifier|preferred|single|Q286306|P348|P548=Q51930650|P577}} | programming language = C | platform = 29 platforms (see {{section link || libcurl}} for details) | genre = Web client (supports e.g. HTTPS, and 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 by the MIT License<ref name="license"/>) and a fraction uses the ISC }} '''cURL''' (pronounced like "curl",<ref name = "FAQ, haxx.se" /> {{IPAc-en|k|ɜːr|l}}) is a 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 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,<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 and 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 IRC chat room.<ref name=history/>
== Components ==
=== libcurl === <code>libcurl</code> is a client-side URL transfer library that powers <code>curl</code>.<ref name="BlueOne" /> 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.
<code>libcurl</code> 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<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, 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{{Citation needed|date=April 2022}} * Azure Sphere OS * BeOS * BlackBerry Tablet OS and BlackBerry 10<ref name = "Blackberry, GitHub" /> * Cesium * Darwin * DOS * Deos * FreeBSD * FreeRTOS * HP-UX * HURD * iOS * IRIX * Linux * macOS * NetBSD * NetWare * OpenBSD * OpenHarmony (HarmonyOS) * OpenVMS * OS/2 * QNX * QNX Neutrino * RISC OS * RTEMS * Solaris * Symbian * Tru64 * Ultrix * UnixWare * Windows * VxWorks * Zephyr {{div col end}}
The <code>libcurl</code> 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.<ref>{{cite web|url=https://curl.se/libcurl/bindings.html|title=libcurl bindings|publisher=curl.se}}</ref>
The <code>libcurl</code> library supports SSL/TLS through GnuTLS, mbedTLS, 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 === <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 <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.
==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,<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== {{Portal|Free and open-source software}} * 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.<ref name = "Ryan, Ryandel, 2018" /> * 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== {{Reflist|2|refs= <ref name=17yearhistory>{{cite web |url=https://daniel.haxx.se/blog/2015/03/20/curl-17-years-old-today/ |title=curl, 17 years old today |last1=Stenberg |first1=Daniel |date=20 March 2015 |website=daniel.haxx.se |access-date=20 March 2015}}</ref> <ref name=history>{{cite web |url=https://curl.se/docs/history.html |title=History of curl - How curl Became Like This |publisher=curl |access-date=November 17, 2016 |quote=Daniel simply adopted an existing command-line open-source tool, httpget, that Brazilian Rafael Sagula had written and recently release version 0.1 of. After a few minor adjustments, it did just what he needed. [...] HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support. [...] Stenberg was spending time writing an IRC bot for an Amiga related channel on EFnet. He then came up with the idea to make currency-exchange calculations available to Internet Relay Chat (IRC) users. |archive-url=https://web.archive.org/web/20170930163727/https://curl.se/docs/history.html |archive-date=September 30, 2017 |url-status=dead }}</ref> <ref name = "FAQ, haxx.se" >{{Cite web|url=https://curl.se/docs/faq.html|title=curl - Frequently Asked Questions|website=curl.se}}</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 = "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 = "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 = "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 = "Stenberg, Haxx SE, 2020" > {{ Cite web | url = https://daniel.haxx.se/blog/2020/01/04/restored-complete-curl-changelog/ | title = Restored complete curl changelog | access-date = 2020-01-02 | first = Daniel | last = Stenberg | author-link = Daniel Stenberg | date = 2020-01-04 | website = Haxx Se | format = html | df = dmy-all }} </ref> <ref name = "Ryan, Ryandel, 2018" > {{ Cite web | url = https://www.ryadel.com/curl-wget-comandi-equivalenti-alternative-windows-command-line-prompt-powershell/ | title = Comandi equivalenti a cURL e Wget per Windows command-line con Powershell | access-date = 2020-01-04 | first = Ryan | date = 2018-03-02 | website = Ryadel | language = it | trans-title = cURL and Wget equivalent commands for Windows command-line with Powershell | quote = Per emulare il comportamento del comando Linux cURL, è sufficiente creare un file cURL.ps1 contenente la seguente riga di codice | format = html | df = dmy-all | last = Del }} </ref> }}
==External links== {{Wikibooks|Guide to Windows Commands}} * {{official website}}
{{Download managers}} {{Windows commands}}
{{DEFAULTSORT:Curl}} Category:1997 software Category:C (programming language) libraries Category:Command-line software Category:Cross-platform free software Category:Download managers Category:Free FTP clients Category:Free software programmed in C Category:Free web crawlers Category:Hypertext Transfer Protocol clients Category:Software using the MIT license Category:Telnet Category:Web scraping