fetchJson()
function fetchJson<T>(url, options?): Promise<T>;Defined in: packages/data-providers/src/fetch-json.ts:22
GET a URL and parse it as JSON, translating every failure mode into a
DataProviderError with a kind the caller can branch on.
Deliberately built on the global fetch rather than an HTTP client — see
http.ts for the shared request path.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type |
|---|---|
url | string |
options | LoadOptions |
Returns
Promise<T>