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

    Function readBodyWithLimit

    • Read a ReadableStream with a hard size limit.

      Parameters

      • stream: ReadableStream<Uint8Array<ArrayBufferLike>>

        The source ReadableStream.

      • url: string

        The request URL (for error messages).

      • limit: SizeLimitConfig

        Size limit configuration (maxBytes, onExceed, callback).

      • Optionalsignal: AbortSignal

        Optional AbortSignal for cancellation.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      Concatenated bytes within the limit.

      If the limit is exceeded (when onExceed = "throw").

      If the signal fires.