knowledge/technology/applications/cli/network/curl.md
2024-03-19 09:25:42 +01:00

2.8 KiB

obj website repo
application https://curl.se/ https://github.com/curl/curl

curl

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 requests, downloading files, and more.

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.
-b, --cookie <data/filename> Pass the data to the HTTP server in the Cookie header.
-d, --data <data> Sends the specified data in a POST request to the HTTP server
-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