@ckirg/corelib - v0.4.1
    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
    • 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). Failure tracking / auto-removal is implemented per-proxy: after 3 consecutive failures a proxy is evicted.

      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>[]>