GzGit in the Zone

Tools & Commands · Linux and Windows Commands

curl

Web · Beginner

Transfers data to or from a URL and can print headers or a response body. It is a client, not a browser, and it does only what the account is allowed to request.

Administrators use it to see a status code and headers without drawing the page. A header request does not download the whole body.

Example: curl -I https://example.com requests only the headers and shows the status line.

Command

Platform: Windows, Linux, and macOS

curl -I https://example.com

-I sends a HEAD request. The first line is the status code. Later lines are headers such as the server name and content type.

Common misconception

  • It does not execute a remote page as a browser would. It transfers data and prints what you asked for.

Related terminology

Quiz this category