Skip to content

DeliveryClientOptions

@ebitex/content-sdk — the framework-agnostic half.

  • Low-level: createDeliveryClient — one method per Content Delivery API endpoint, the delivered vocabulary as types (types.ts) and runtime guards (guards.ts), typed errors.
  • High-level: createContentClientresolveLocation(location) for router changes: site from the page’s own host, locale from the browser’s languages against the organization’s tree, the context bag, a full/normalized resolve strategy, caching and cancellation.

Nothing here imports React; the rendering layer is @ebitex/content-sdk/react. Both clients run in a browser (with a browser-safe delivery key) and in Node (any key).

apiKey: string

A Content delivery key, created on the Content app’s Delivery page. A key with an allowed-origins or allowed-IP-ranges restriction is browser-safe and may ship in a bundle; a key with neither is a server-side key and must never reach a browser — it works from any origin and any address. The SDK cannot tell the two apart; only the Delivery page can, so decide where this client runs before choosing a key.


optional baseUrl?: string

Defaults to ebitex’s production API. Override for a self-hosted or local deployment.


optional fetch?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Injectable for testing or for a runtime with a non-global fetch.

(input, init?): Promise<Response>

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | URL | Request

RequestInit

Promise<Response>