Open Agent Loops
API Reference

toCurl

@open-agent-loops/core


function toCurl(body, options): string;

Defined in: observability/to-curl.ts:55

Render a captured request body as a runnable curl command.

Parameters

ParameterTypeDescription
bodyunknownThe request body as POSTed (a RawRequest's body).
optionsToCurlOptionsEndpoint URL, API-key env var, and an optional stream override.

Returns

string

A multi-line curl string with the key referenced as $<apiKeyEnv>.

On this page