kinetex - v0.0.2
    Preparing search index...

    Interface RequestConfig<T>

    interface RequestConfig<T = unknown> {
        agent?: unknown;
        baseURL?: string;
        body?: BodyInit;
        cache?: false | CacheConfig;
        credentials?: RequestCredentials;
        decompress?: boolean;
        dedupe?: boolean;
        followRedirects?: boolean;
        form?: Record<string, string | number | boolean>;
        har?: boolean;
        headers?: HeadersInit;
        hooks?: HookConfig;
        json?: unknown;
        logger?: Logger;
        maxRedirects?: number;
        method?: string;
        onDownloadProgress?: (event: ProgressEvent) => void;
        onUploadProgress?: (event: ProgressEvent) => void;
        prefetch?: boolean;
        responseType?:
            | "json"
            | "text"
            | "blob"
            | "arrayBuffer"
            | "formData"
            | "stream";
        retry?: number
        | RetryConfig;
        schema?: AnyValidator<T>;
        searchParams?:
            | string
            | URLSearchParams
            | Record<string, string | number | boolean | string[]>;
        signal?: AbortSignal;
        throwHttpErrors?: boolean;
        timeout?: number | TimeoutConfig;
        transport?: "fetch" | "undici";
        url: string;
        [key: string]: unknown;
    }

    Type Parameters

    • T = unknown

    Indexable

    • [key: string]: unknown

      Extra fields for middleware

    Index

    Properties

    agent?: unknown

    Custom undici dispatcher / agent for this request (Node.js only). Accepts an undici Agent, Pool, or ProxyAgent instance. When set, disables the default connection pool for this request.

    baseURL?: string

    Base URL prepended to relative URLs

    body?: BodyInit
    cache?: false | CacheConfig

    Response body cache

    credentials?: RequestCredentials

    Credentials mode for fetch

    decompress?: boolean

    Whether to automatically decompress the response body (gzip/br/deflate). Default: true. Set to false to receive raw compressed bytes.

    dedupe?: boolean

    Deduplicate identical in-flight GET requests

    followRedirects?: boolean

    Follow redirects (default: true)

    form?: Record<string, string | number | boolean>

    Form data — sets Content-Type: application/x-www-form-urlencoded

    har?: boolean

    HAR recording

    headers?: HeadersInit
    hooks?: HookConfig

    Lifecycle hooks

    json?: unknown

    JSON body — serialised automatically, sets Content-Type

    logger?: Logger

    Log all requests (uses hooks internally)

    maxRedirects?: number

    Max redirects (default: 10)

    method?: string
    onDownloadProgress?: (event: ProgressEvent) => void

    Download progress callback

    onUploadProgress?: (event: ProgressEvent) => void

    Upload progress callback

    prefetch?: boolean

    Prefetch hint — fire request before it's awaited

    responseType?: "json" | "text" | "blob" | "arrayBuffer" | "formData" | "stream"

    Parse response as json:true / text / blob / arrayBuffer / formData

    retry?: number | RetryConfig

    Retry config

    schema?: AnyValidator<T>

    Schema to validate response body (zod, valibot, or custom)

    searchParams?:
        | string
        | URLSearchParams
        | Record<string, string | number | boolean | string[]>

    URL search params merged into url

    signal?: AbortSignal

    AbortSignal for cancellation

    throwHttpErrors?: boolean

    Throw on non-2xx responses (default: true)

    timeout?: number | TimeoutConfig

    Timeout config

    transport?: "fetch" | "undici"

    Force a specific transport

    url: string