talira

command line tool and library for transferring data with URLs

open sourcecurlself-hostablefree

curl is one project with two products: libcurl, a portable client-side URL transfer library in C, and the curl command-line tool built on it, so both speak the same protocols. Those are HTTP/1.1, HTTP/2 and HTTP/3, WebSocket, FTP and FTPS, SCP and SFTP, SMTP, IMAP and POP3, LDAP, MQTT, TFTP, TELNET, DICT, Gopher, RTSP and FILE, with cookies, proxies (HTTP, HTTPS, SOCKS), Basic, Digest and Negotiate authentication, resumed transfers, HSTS, alt-svc, DNS-over-HTTPS and Encrypted Client Hello. libcurl's TLS backend is chosen at build time: OpenSSL and its forks, GnuTLS, wolfSSL, mbedTLS, Schannel or (experimental in curl) Rustls. The project claims more than twenty billion installations, in cars, TVs, routers, phones and medical devices, and lists dozens of language bindings that other people maintain. It dates from 1998, is led by Daniel Stenberg and is released under the curl licence, an MIT/X-style licence.

Ways to install

Problems it solves

  • download a file from a URL in a shell script and fail the script if the server returns an error
  • test a REST API from the terminal with custom headers, a JSON body and a bearer token
  • see the exact request and response headers and TLS handshake when debugging a web server
  • resume a large download that broke halfway instead of starting over
  • upload files to an FTP or SFTP server from a cron job
  • send an email through an SMTP server from a script without a mail client
  • fetch messages from an IMAP mailbox from the command line
  • my C or C++ application needs to make HTTPS requests on embedded Linux with a small, portable library
  • add HTTP/2 and HTTP/3 support to a native app without writing a protocol stack
  • check whether a site is served over HTTP/3 and how long DNS, connect and TLS each take
  • post a multipart form with a file attachment from the command line
  • send requests through a SOCKS5 or HTTPS proxy, with proxy authentication
  • keep cookies between requests in a script that logs into a website
  • test my API with a client certificate for mutual TLS
  • run many downloads in parallel from one command

View all 22 problems

Features

  • libcurl C library and the curl command-line tool, built on it
  • HTTP/0.9 (optional), HTTP/1.0, HTTP/1.1, HTTP/2 with multiplexing and HTTP/3
  • WebSocket (ws, wss)
  • FTP, FTPS, SCP, SFTP, TFTP, FILE uploads and downloads with resume
  • SMTP, SMTPS, POP3, POP3S, IMAP, IMAPS with SASL authentication
  • LDAP, LDAPS, MQTT, RTSP, TELNET, DICT, Gopher and Gopher over TLS
  • Basic, Digest and Negotiate (SPNEGO) authentication for servers and proxies
  • HTTP, HTTPS and SOCKS 4/5 proxies, pre-proxies and CONNECT tunnelling
  • cookie engine reading and writing Netscape cookie files
  • HSTS, alt-svc and ETag support
View 9 more
  • deflate, gzip, Brotli and zstd content decoding
  • TLS backends chosen at build time: OpenSSL, BoringSSL, AWS-LC, LibreSSL, QuicTLS, GnuTLS, wolfSSL, mbedTLS, Schannel, Rustls (experimental)
  • client certificates, key pinning, Encrypted Client Hello (ECH)
  • DNS-over-HTTPS, Happy Eyeballs, IPv6, Unix domain sockets
  • parallel transfers, URL globbing, config files and .netrc
  • rate limiting, transfer time limits and minimum speed limits
  • URL API and header API in libcurl
  • stable API and ABI; runs on 101 operating systems and 28 CPU architectures
  • official Windows builds and Docker images (curlimages/curl)

Limitations

  • Doesn't download websites recursively or mirror them: curl is made for single-shot transfers4
  • Doesn't run JavaScript: pages, redirects and .pac proxy files that need it aren't handled4

Capabilities

Has an APIplan not known
Has a command line toolplan not known

Alternatives

The same job

These do what curl does.

  1. HTTPie CLI Modern, user-friendly command-line HTTP client for the API era
  2. xh Friendly and fast tool for sending HTTP requests
  3. GNU Wget A free software package for retrieving files using HTTP, HTTPS and FTP
  4. aria2 Lightweight multi-protocol & multi-source command-line download utility

Compare curl with the top 3