Skip to main content
Version: v8.0.0

createSdk


Import
import { createSdk } from "@hyper-fetch/core"

Parameters

createSdk<Client, RecursiveSchema>(client: Client, options: CreateSdkOptions<RecursiveSchema>)
Parameters
NameTypeDescription
client
Client
options
CreateSdkOptions<RecursiveSchema>

Returns

type SdkInstance<Schema,TClient> = InjectClient<Schema, TClient> & { $configure: (defaults: SdkConfigurationMap<Schema>) => SdkInstance<Schema, TClient> };
createSdk
NameTypeDescription
$configure
(defaults: SdkConfigurationMap<Schema>) => SdkInstance<Schema, TClient>

Apply request defaults to the SDK. Returns a new SDK instance with the configuration applied. Use "*" to match all endpoints, or specific endpoint strings / wildcard patterns.