Class RateLimiter
RateLimiter
provides an interface for rate limiting HTTP Requests.
Inherits from
-
Object
(base class)
Fields
Name | Type | Description |
---|---|---|
cooldowns
|
vibe |
|
states
|
RateLimitState[Route] |
Methods
Name | Description |
---|---|
check
|
Check whether a request can be made for a route . If the route is on cooldown ,
wait until the cooldown resets before returning.
|
cooldown
|
Cooldown a route for a given duration . Blocks ALL requests from completing.
|
update
|
Update a given route with headers returned from a request.
|