KtorRequestHandler
class KtorRequestHandler(client: HttpClient, requestRateLimiter: RequestRateLimiter = ExclusionRequestRateLimiter(), clock: Clock = Clock.System, parser: Json = jsonDefault, val token: String) : RequestHandler(source)
A RequestHandler that uses ktor's HttpClient to execute requests and accepts a requestRateLimiter to schedule requests.
Parameters
client
A HttpClient configured with the required headers for identification.
clock
A Clock to calculate bucket reset times, exposed for testing.
parser
Serializer used to parse payloads.
Constructors
Link copied to clipboard
constructor(client: HttpClient, requestRateLimiter: RequestRateLimiter = ExclusionRequestRateLimiter(), clock: Clock = Clock.System, parser: Json = jsonDefault, token: String)
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Returns a new RequestHandler with stack trace recovery enabled.