On Windows, curl behaves differently in the old and new terminals.
curl stands for “client URL” tool. For detailed usage, see Ruan Yifeng's blog post curl Usage Guide - Ruan Yifeng's Blog (ruanyifeng.com).
I only use it to download web pages, because some files exist as web pages and are not very convenient to save directly to your local machine.
Old terminal: CMD
Just use a command like the following.
$ curl -O https://www.example.com/foo/bar.html
This saves the server response to a file and uses the last part of the URL as the filename. The command above saves the server response to a file named bar.html .
New terminal: PowerShell
Use a command like the following.
$ curl -O bar.html -uri https://www.example.com/foo/bar.html
-O specifies the output filename; without this option, the server response will be displayed in the terminal.
-uri specifies the original server address.
curl Command-Line Tool