Did you know that it is possible to install cURL in Windows? This open source tool, which allows communication through different protocols from the command line, has been (and is) widely used especially in scripts and programming languages, especially PHP, in different environments and devices. Although it is well known in Linux and Mac OS X environments, it can also be used from Windows.
cURL on Windows
To install it you have two options: you use Chocolatey, the package manager for Windows , ( choco install curl ) or from the official page, using the wizard , which may be more comfortable for you.
If you did not know it, I recommend you take a look at the manual that is on the official site (very retro, right?), Where everything you would be able to do with this little tool is shown. Here are some of the most common examples:
Requests using the different HTTP Verbs
Download a file
one |
curl -O www.domain.com/file.txt |
If for example you are downloading a file with the previous command and it is too large and a cut occurs, it is possible to use -C - to continue the download where it left off:
one |
curl -C - -O www.domain.com/file.txt |
Download multiple files
one |
curl -O www.domain1.com/file1.txt -O www.domain2.com/file2.txt |
Pass basic authentication on a request with cURL
one |
curl -u username:password www.domain.com |
Download files from an FTP server
one |
curl -u ftpuser:ftppass -O ftp://ftp_server/stuff/file.txt |
Send an email using the SMTP protocol