kinetex - v1.0.0-rc.1
    Preparing search index...

    Interface FetchTransportOptions

    Options for the universal fetch-based transport.

    interface FetchTransportOptions {
        fetchFn?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        strict?: boolean;
        onDroppedHeader?: (name: string, value: string) => void;
    }
    Index

    Properties

    fetchFn?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Custom fetch implementation. Defaults to globalThis.fetch.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    strict?: boolean

    When true, invalid headers cause a KinetexError instead of being silently dropped. Recommended for strict/production environments where silent data loss is unacceptable.

    Default: false (drop & warn).

    onDroppedHeader?: (name: string, value: string) => void

    Called whenever a header is dropped due to an invalid name or value. Useful for logging or monitoring header sanitization in non-strict mode.

    Type Declaration

      • (name: string, value: string): void
      • Parameters

        • name: string

          The header name that was dropped.

        • value: string

          The header value that was dropped.

        Returns void