API.fetch() method

A typed fetch handler for API requests.

Signature:

fetch<TData extends {} = any, TQuery extends Record<string, unknown> = {}, TParseAs extends FetchParseAs = FetchParseAs>(path: string, init?: FetchInit<TQuery, TParseAs>): Promise<FetchResult<TData, TParseAs>>;

Parameters

Parameter

Type

Description

path

string

init

FetchInit<TQuery, TParseAs>

(Optional)

Returns:

Promise<FetchResult<TData, TParseAs>>

Remarks

This handler will throw an APIError on 4xx and 5xx status codes.

Get in touch

We'd love to learn more about your vision and how we can help.

PressPrivacyTermsSupportCopyright © 2025 Core3D, Inc. All Rights Reserved.