Copied to clipboard

curl

`curl` is a command-line tool used to send and receive network requests. It supports multiple protocols, including HTTP, FTP, and SMTP, and can be run directly in the terminal. `curl` is commonly used to download files from the command line or interact with APIs.
For example: <http://example.com>

Example

  • Send a GET request and display the response in the terminal:
curl <http://example.com>
  • Send a POST request and display the response in the terminal:
curl -X POST <http://example.com> --data "param1=value1&param2=value2"
  • Download a file and save it to a local file:
curl -o filename.txt <http://example.com/file.txt>
  • Set request headers:
curl -H 'Content-Type: application/json' <http://example.com>
  • Send a request using a proxy server:
curl -x <http://proxy-server>:port <http://example.com>