HTTP to cURL

Turn HTTP request details into a curl command, with the same request as fetch and axios code. Handles auth, headers and body.

Pay by wallet (x402) http-to-curl

Example

Input
{
  "url": "https://example.com",
  "body": "This is a test input for automated capability testing.",
  "headers": {
    "Content-Type": "application/json"
  }
}
Answer
{
  "url": "https://example.com",
  "method": "GET",
  "curl_command": "curl \\\n  'https://example.com' \\\n  -H 'Content-Type: application/json' \\\n  -d 'This is a test input for automated capability testing.'",
  "equivalent_axios": "const response = await axios.get(\"https://example.com\", {\n  headers: {\"Content-Type\":\"application/json\"},\n  data: `This is a test input for automated capability testing.`,\n});",
  "equivalent_fetch": "const response = await fetch(\"https://example.com\", {\n  headers: {\n      \"Content-Type\": \"application/json\"\n  },\n  body: `This is a test input for automated capability testing.`,\n});"
}

Inputs

FieldTypeRequiredWhat it is
urlstringYes—
authobjectNo—
bodyanyNo—
methodstringNo—
headersobjectNo—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
curl_commandstringAlways (present in every successful answer)
equivalent_axiosstringAlways (present in every successful answer)
equivalent_fetchstringAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "http-to-curl",
    "inputs": {
      "url": "https://example.com",
      "body": "This is a test input for automated capability testing.",
      "headers": {
        "Content-Type": "application/json"
      }
    },
    "max_price_cents": 2
  }'

Limitations

  • Binary and multipart requests may need manual adjustment

    Converts standard HTTP request formats — binary payloads or multipart uploads may produce simplified curl equivalents

    What to do instead: For binary payloads, use the --data-binary flag manually and reference the file path instead of inline content