Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

curl and HTTP Command-Line Tools Cheat Sheet

curl and HTTP Command-Line Tools Cheat Sheet

Back to Operating Systems and CLI
Updated 2026-05-20
Next Topic: Debian Cheat Sheet

curl is a command-line tool and library for transferring data across dozens of protocols — HTTP, HTTPS, FTP, SFTP, SMTP, and more — making it the universal Swiss Army knife for network operations. It is pre-installed on macOS and Windows 10+ and powers over 20 billion installations worldwide, from embedded devices to CI pipelines. Understanding the difference between curl's flag-heavy but precise syntax and the friendlier alternatives (HTTPie, wget) determines which tool fits each job: curl for scripting and API work, wget for recursive downloads, HTTPie for interactive API exploration.

What This Cheat Sheet Covers

This topic spans 16 focused tables and 116 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Core HTTP MethodsTable 2: Sending Data and Request BodiesTable 3: Request HeadersTable 4: Authentication MethodsTable 5: TLS and Certificate OptionsTable 6: Verbose Output and DebuggingTable 7: Response Timing and Metrics with --write-outTable 8: File Download OptionsTable 9: Redirect HandlingTable 10: Cookie HandlingTable 11: Proxy ConfigurationTable 12: Connection and Retry OptionsTable 13: HTTP Protocol Version FlagsTable 14: curl Scripting Patterns and TipsTable 15: HTTPie — Human-Friendly HTTP ClientTable 16: wget — Recursive Downloading and File Mirroring

Table 1: Core HTTP Methods

Every REST API interaction maps to an HTTP verb; curl sends them all via -X or implied defaults.

CommandExampleDescription
GET request
curl https://api.example.com/users
Default method — no -X flag needed; retrieves the resource at the URL.
POST request
curl -X POST -H "Content-Type: application/json"
-d '{"name":"alice"}' https://api.example.com/users
Creates a new resource; -d implicitly sets method to POST and Content-Type to application/x-www-form-urlencoded unless overridden.
PUT request
curl -X PUT -H "Content-Type: application/json"
-d '{"name":"alice","age":30}' https://api.example.com/users/1
Fully replaces the resource; must supply the complete representation.
PATCH request
curl -X PATCH -H "Content-Type: application/json"
-d '{"age":31}' https://api.example.com/users/1
Partially updates a resource — send only the fields that change.

More in Operating Systems and CLI

  • Command Line Fundamentals Cheat Sheet
  • Debian Cheat Sheet
  • AWS CLI Cheat Sheet
  • GCP CLI Cheat Sheet
  • macOS Usage Cheat Sheet
  • Windows 11 Troubleshooting Cheat Sheet
View all 31 topics in Operating Systems and CLI