generate_curl
Generate a curl command from request parameters. Supports GET/POST/PUT/DELETE, custom headers, JSON body, and form data. Useful for documentation, sharing, and debugging API calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Request URL (must be http/https) | |
| body | No | Raw request body string | |
| method | No | HTTP method (default: GET) | |
| headers | No | Request headers as key-value object | |
| verbose | No | Add -v for verbose output (default: false) | |
| body_json | No | JSON body (auto-adds Content-Type: application/json) | |
| follow_redirects | No | Follow redirects with -L flag (default: true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| curl | No | ||
| method | No | ||
| header_count | No |