http¶
Make HTTP requests (like curl).
Synopsis¶
Description¶
Perform HTTP requests with support for different methods, headers, and data.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--method |
-X |
HTTP method | GET |
--headers |
-H |
Custom headers (can repeat) | |
--data |
-d |
POST data | |
--output |
-o |
Write output to file | |
--follow-redirects |
-L |
Follow redirects | false |
--verbose |
-v |
Verbose output | false |
--insecure |
-k |
Allow insecure SSL connections | false |
Examples¶
Simple GET request:
POST with data:
POST with data (auto-detects POST method):
Set custom headers:
tofu http -H "Authorization: Bearer token123" -H "Content-Type: application/json" https://api.example.com
Save response to file:
Follow redirects:
Verbose mode (show headers):
Allow self-signed certificates: