core / pragma.http / ConcurrencyLimitedHttpClient /

ConcurrencyLimitedHttpClient #

class ConcurrencyLimitedHttpClient(delegate: TimedHttpClient, semaphore: MetrickingPragmaSemaphore) : HttpClient

Wraps a TimedHttpClient with a per-instance cap on the number of concurrent outbound requests, enforced by a MetrickingPragmaSemaphore. Each convenience method holds a permit for the duration of the call. use is a pass-through and is not permit-limited: it hands out the raw ktor client rather than issuing a single request.

The sensitiveValues parameter on each helper is passed through to TimedHttpClient. See HttpRequest.

Constructors #

ConcurrencyLimitedHttpClient

fun ConcurrencyLimitedHttpClient(delegate: TimedHttpClient, semaphore: MetrickingPragmaSemaphore)