Skip to main content

createFetchJson

@retinue/monorepo


@retinue/monorepo / backend/src / createFetchJson

Function: createFetchJson()

createFetchJson(config?): (rawUrl) => Promise<JsonResult>

Defined in: backend/src/toolkit/web.ts:69

Fetch and parse JSON.

Requested unfenced, because the body is parsed here and reaches the model as structured data, not as prose. Fencing it would put delimiters inside string values. The safety argument is different in kind: a parsed object cannot retinue a section boundary, and a caller rendering one back into a prompt is the caller that must fence.

Parameters​

config?​

HttpClientConfig & object = {}

Returns​

(rawUrl) => Promise<JsonResult>