knowledge/technology/applications/cli/network/curl.md

33 lines
2.8 KiB
Markdown
Raw Normal View History

2023-12-04 10:02:23 +00:00
---
obj: application
os: linux
website: https://curl.se/
repo: https://github.com/curl/curl
---
# curl
2024-01-17 08:00:45 +00:00
cURL is a command-line tool and library for transferring data with URLs. It supports a wide range of protocols, making it a versatile tool for making [HTTP](../../../internet/HTTP.md) requests, downloading files, and more.
2023-12-04 10:02:23 +00:00
## Usage
To make a simple GET request: `curl https://example.com`
## Options
| Option | Description |
| -------------------------------------- | ------------------------------------------------------------------------------------- |
| `-C, --continue-at <offset>` | Continue/Resume a previous file transfer at the given offset. |
| `-c, --cookie-jar <filename>` | Specify to which file you want curl to write all cookies after a completed operation. |
2024-01-17 08:00:45 +00:00
| `-b, --cookie <data/filename>` | Pass the data to the [HTTP](../../../internet/HTTP.md) server in the [Cookie](../../../internet/Cookie.md) header. |
| `-d, --data <data>` | Sends the specified data in a POST request to the [HTTP](../../../internet/HTTP.md) server |
2023-12-04 10:02:23 +00:00
| `-F, --form <name=content>` | Specify multipart MIME data |
| `-k, --insecure` | Allow insecure server connections when using SSL |
| `-L, --location` | Follow redirects |
| `-o, --output <file>` | Write to file instead of stdout |
| `-x, --proxy [protocol://]host[:port]` | Use this proxy |
| `-X, --request <command>` | Specify request command to use |
| `-r, --range <range>` | Retrieve only the bytes within RANGE |
| `--retry <num> ` | Retry request if transient problems occur |
| `-s, --silent` | Silent mode |
| `--retry-delay <seconds> ` | Wait time between retries |
| `-u, --user <user:password>` | Server user and password |
| `-A, --user-agent <name>` | Send User-Agent \<name> to server |