Exceptions Only Limiter
class ExceptionsOnlyLimiter(defaultTooManyRequestsDelay: MilliSeconds) : RequestLimiter
Content copied to clipboard
This limiter will limit requests only after getting a RetryAfterError or ClientRequestException with HttpStatusCode.TooManyRequests status code. Important thing is that in case if some of block has been blocked, all the others will wait until it will be possible to be called
Parameters
default Too Many Requests Delay
This parameter will be used in case of getting ClientRequestException with HttpStatusCode.TooManyRequests as a parameter for delay like it would be TooMuchRequestsException. The reason of it is that in ClientRequestException there is no information about required delay between requests
Constructors
ExceptionsOnlyLimiter
Link copied to clipboard
fun ExceptionsOnlyLimiter(defaultTooManyRequestsDelay: MilliSeconds = 1000)
Content copied to clipboard