Skip to main content
Version: v8.0.0

FetchAdapterOptionsType

Options passed to the native fetch adapter. Extends RequestInit with a timeout option.


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

Preview

type FetchAdapterOptionsType = Omit<RequestInit, (method | headers | body | signal)> & { streaming?: boolean; timeout?: number };

Structure

FetchAdapterOptionsType
NameTypeDescription
streaming
boolean

When true, the response data will be a ReadableStream&lt;Uint8Array&gt; instead of parsed JSON/text. This enables streaming consumption of the response body (e.g., for SSE, large file downloads, or real-time text generation from LLMs).

timeout
number

Request timeout in milliseconds. Defaults to 5000ms.