x402

HTTP to cURL (x402)

Convert HTTP request parameters to curl command + equivalent fetch/axios code. Supports auth, headers, body. Algorithmic.

get/x402/v2/http-to-curl

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/http-to-curl
  • Auth: none required

Query parameters

urlstring required
authobject
bodyunknown
methodstring
headersobject

Response

Success

curl_commandstring
equivalent_axiosstring
equivalent_fetchstring

Example response

{
  "url": "https://example.com",
  "method": "GET",
  "curl_command": "curl \\\n  'https://example.com'",
  "equivalent_axios": "const response = await axios.get(\"https://example.com\");",
  "equivalent_fetch": "const response = await fetch(\"https://example.com\");"
}

Changes

No recorded changes to this operation across all 1 revision of this API.