API Reference
toCurl
function toCurl(body, options): string;Defined in: observability/to-curl.ts:55
Render a captured request body as a runnable curl command.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | unknown | The request body as POSTed (a RawRequest's body). |
options | ToCurlOptions | Endpoint URL, API-key env var, and an optional stream override. |
Returns
string
A multi-line curl string with the key referenced as $<apiKeyEnv>.