curl
(https://curl.haxx.se/) is an incredibly
useful and powerful command-line tool and library. The latest version at the time of this writing
is 7.68.0 released January 8, 2020. You can download it from https://curl.haxx.se/download.html and the source code is available at https://github.com/curl/curl.
It's primary purpose is transferring data
over network protocols like HTTP and HTTPS. It supports a large number of other protocols including:
FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, Telnet and TFTP.
It also supports SSL/TLS encryption, cookies, authentication, and proxies.
You can use it as a command-line tool by calling curl
or you can use it as a library inside C, C++, or other applications. We will look at several things in this tutorial including:
- Basic curl usage for making HTTP requests
- Downloading files
- Compiling from source
- Using curl in a C++ application