Click "Generate cURL" to see the command
Select a language to generate code
No request history yet
cURL (Client URL) is a command-line tool and library for transferring data with URLs. It supports a wide range of protocols including HTTP, HTTPS, FTP, SFTP, and more. cURL is widely used for testing REST APIs, debugging web applications, downloading files, and automating HTTP requests in scripts and CI/CD pipelines.
| Option | Description | Example |
|---|---|---|
-X |
Specify HTTP method | -X POST |
-H |
Add custom header | -H "Content-Type: application/json" |
-d |
Send data in request body | -d '{"key":"value"}' |
-u |
Basic authentication | -u username:password |
-L |
Follow redirects | -L |
-k |
Allow insecure SSL | -k |
-v |
Verbose output | -v |
| Tool | Type | Best For | Platform |
|---|---|---|---|
| cURL | CLI | Scripting, automation, quick tests | Cross-platform |
| Postman | GUI | Team collaboration, collections | Desktop/Web |
| Insomnia | GUI | GraphQL, design-first APIs | Desktop |
| HTTPie | CLI | Human-friendly syntax | Cross-platform |
cURL Command
curl -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-H "Authorization: Bearer token123" \
-d '{"name":"John","email":"[email protected]"}'
Python (requests)
import requests
response = requests.post(
"https://api.example.com/users",
headers={"Authorization": "Bearer token123"},
json={"name": "John", "email": "[email protected]"}
)
print(response.json())
-H "Authorization: Bearer $API_KEY"-k/--insecure in production - it disables SSL certificate verification--netrc or credential helpers for authentication instead of inline passwordsGET Request:
curl https://api.example.com/users
POST with JSON:
curl -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-d '{"name":"John"}'
With Bearer Token:
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://api.example.com/protected
Download File:
curl -O https://example.com/file.zip
Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site β you're helping me build what developers actually need.