Networking

curl

Transfers data with URLs.

curl is a flexible client for HTTP, HTTPS, and many other protocols. It is widely used for testing APIs and downloads.

Syntax
curl [options] URL

Arguments explained

  • URL is the target address.
  • -I fetches headers only.
  • -L follows redirects.
  • -o writes output to a file.
  • -X chooses an HTTP method.
  • -H adds a header.

Common examples

Inspect headers
curl -I https://example.com

Shows HTTP response headers without the body.

Download to a file
curl -L -o file.tar.gz https://example.com/file.tar.gz

Follows redirects and saves to a chosen filename.

curl Command
FieldDetails
Commandcurl
CategoryNetworking
Primary useTransfers data with URLs.
Syntaxcurl [options] URL