@happy-ts/fetch-t
    Preparing search index...

    Type Alias FetchResponseType

    FetchResponseType: "text" | "arraybuffer" | "blob" | "json" | "bytes" | "stream"

    Specifies the expected response type for automatic parsing.

    • 'text' - Parse response as string via Response.text()
    • 'json' - Parse response as JSON via Response.json()
    • 'arraybuffer' - Parse response as ArrayBuffer via Response.arrayBuffer()
    • 'bytes' - Parse response as Uint8Array via Response.bytes() (with fallback for older environments)
    • 'blob' - Parse response as Blob via Response.blob()
    • 'stream' - Return the raw ReadableStream for streaming processing

    If not specified, the raw Response object is returned.

    import { fetchT, type FetchResponseType } from '@happy-ts/fetch-t';

    const responseType: FetchResponseType = 'json';

    const result = await fetchT('https://api.example.com/data', { responseType });