cURL

{{Short description|Free URL data transfer client software}}

{{Other uses|Curl (disambiguation){{!}}Curl}}

{{confused|Curl (programming language)}}

{{lowercase title}}

{{Infobox software

| name = curl

| logo = Curl-logo.svg

| author = Daniel Stenberg

| developer = [https://curl.se/docs/thanks.html Contributors to the curl project]

| released = {{Start date and age|1996}}

| 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 = Cross-platform

| genre = web client (supports e.g. HTTPS, and FTP)

| license = curl license{{cite web|url=https://spdx.org/licenses/curl.html|title=curl License|website=spdx.org}}{{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}} (inspired on the MIT License), also ISC, 3-clause BSD, 4-clause BSD{{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}}

| website = {{Official URL}}

}}

cURL (pronounced like "curl", {{IPAc-en|k|ɜːr|l}}) is a free and open source computer program for transferring data to and from Internet servers using various network protocols. 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 both 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,{{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}} originally named httpget and then became urlget, before adopting the current name of curl. The name stands for "Client for URL". 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.

Components

= libcurl =

libcurl is a client-side URL transfer library that powers curl, supporting DICT, FTP, FTPS, Gopher, HTTP/1 (with HTTP/2 and HTTP/3 support), HTTP cookies, HTTP POST, HTTP PUT, HTTP proxy tunneling, HTTPS, IMAP, Kerberos, LDAP, MQTT, POP3, RTSP, RTMP, SCP, SMTP, and SMB. The library supports the file URI scheme, SFTP, Telnet, TFTP, file transfer resume, FTP uploading, HTTP form-based upload, HTTPS certificates, LDAPS, proxies, and user-plus-password authentication.{{cite web |title=curl - How To Use |url=https://curl.se/docs/manpage.html |website=curl.se}}

The libcurl library is portable, as it builds and works identically on most platforms, including AIX, AmigaOS, Android,{{Citation needed|date=April 2022}} BeOS, BlackBerry Tablet OS and BlackBerry 10, OpenVMS, Darwin, DOS, FreeBSD, HP-UX, HURD, iOS, IRIX, Linux, macOS, NetBSD, NetWare, OpenBSD, OS/2, QNX Neutrino, RISC OS, Solaris, Symbian, Tru64, Ultrix, UnixWare, Microsoft Windows and OpenHarmony.{{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}}{{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}}

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.{{cite web|url=https://curl.se/libcurl/bindings.html|title=libcurl bindings|publisher=curl.se}}

The libcurl library supports GnuTLS, mbed TLS, NSS, {{proper name|GSKit}} on IBM i, SChannel on Windows, Secure Transport on macOS and iOS, SSL/TLS through OpenSSL, BoringSSL, libreSSL, AmiSSL, wolfSSL, BearSSL and {{proper name|rustls}}.{{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}}

= 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.

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:

  1. Directory where the curl program is located.
  2. Current working directory.
  3. Windows system directory.
  4. Windows directory.
  5. Directories specified in the %PATH% environment variables.

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.

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.
  • 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=

{{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}}

{{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 }}

{{Cite web|url=https://curl.se/docs/faq.html|title=curl - Frequently Asked Questions|website=curl.se}}

{{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}}

{{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}}

{{ 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 }}

{{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 }}

{{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}}

{{Cite web|url=https://curl.se/docs/sslcerts.html|title=curl - SSL CA Certificates|website=curl.se}}

{{ 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 }}

{{ 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 }}

{{ 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 }}

}}