@ckir/corelib - v0.1.13
    Preparing search index...

    Class RequestProxied

    Proxied HTTP client with automatic rotation, fallback, and load-balancing.

    Public API is identical to RequestUnlimited (same return types, same Options merging, same discriminated union). All heavy lifting (retries, serialization, logging, error handling) is delegated to RequestUnlimited.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Makes a single proxied HTTP request with full fallback.

      Type Parameters

      • T = unknown

      Parameters

      • url: string | URL | Request

        Original target URL (same as RequestUnlimited).

      • suffix: string = ""

        Optional path to append to the proxy base (default "").

      • options: Options = {}

        Ky options passed through to RequestUnlimited (headers, method, body, etc.).

      Returns Promise<RequestResult<T>>

    • Makes parallel proxied requests with explicit round-robin load balancing.

      Each original URL is assigned to a proxy via round-robin. The constructed proxy URLs are then passed to RequestUnlimited.endPoints (parallelism + retries handled there).

      Note: failure tracking / auto-removal is currently only implemented for endPoint(). endPoints uses the current activeProxies snapshot at call time.

      Type Parameters

      • T = unknown

      Parameters

      • urls: (string | URL | Request)[]

        Array of original target URLs.

      • suffix: string = ""

        Optional suffix applied to every proxy (default "").

      • options: Options = {}

        Ky options applied to all requests.

      Returns Promise<RequestResult<T>[]>