@metreeca/http - v0.1.1
    Preparing search index...

    Module throttle

    Adaptive pacing and retries middleware.

    Paces the exchanges routed through the wrapped Fetch implementation with an adaptive throttle, retrying transient failures as the target directs.

    Usage

    import { createFetch } from "@metreeca/http";
    import { success } from "@metreeca/http/success";
    import { throttle } from "@metreeca/http/throttle";
    import { timeout } from "@metreeca/http/timeout";

    const client = createFetch(
    success(), // declared before throttle: retries see responses, not rejections
    throttle({ minimum: 100, attempts: 3 }),
    timeout(5000) // bounds each attempt on its own
    );
    throttle

    Creates a middleware pacing exchanges and retrying transient failures.