Skip to content

createFetchTransport

createFetchTransport(options): EndpointTransport

Defined in: wp-typia-api-client/src/client.ts:298

Create a fetch-backed transport for generated endpoint contracts.

FetchTransportOptions

Base URL, default headers, and optional fetch override.

EndpointTransport

A transport compatible with callEndpoint() and the header helpers.

Use this when your client should resolve relative endpoint paths from a fixed API base URL and execute them with the standard Fetch API.

const transport = createFetchTransport({
baseUrl: "https://example.com/wp-json/",
});