Package discord4j.rest.request
Components to build and route requests to the Discord REST API.
-
Interface Summary Interface Description GlobalRateLimiter Used to prevent requests from being sent while the bot is globally rate limited.RateLimitStrategy A mapper between aHttpClientResponseand aDurationrepresenting a delay due to rate limiting.RequestQueue<T> Abstraction for a REST request queue.RequestQueueFactory Factory to createRequestQueueinstances.Router Represents a connector executingDiscordWebRequestobjects against the Discord REST API. -
Class Summary Class Description BucketGlobalRateLimiter An implementation ofGlobalRateLimiterthat uses aRateLimitOperatorcoordinate requests, injecting an additional delay if a source trips the limiter early throughBucketGlobalRateLimiter.rateLimitFor(Duration).BucketKey Used to access the appropriateRequestStreamaccording to the bucket that requests for the stream fall into.DefaultRouter Facilitates the routing ofDiscordWebRequestinstances to the properRequestStreamaccording to the bucket in which the request falls.DiscordWebRequest Template encoding all of the needed information to make an HTTP request to Discord.DiscordWebResponse Contract to handle aMonoofClientResponseafter a network exchange is done.RateLimitRetryOperator The retry function used for reading and completing HTTP requests.ResponseHeaderStrategy RouteMatcher A predicate that can match a givenDiscordWebRequest.RouterOptions Options used to control the behavior of aRouter. -
Exception Summary Exception Description DiscardedRequestException Thrown when a REST request is discarded because of a queue overflow.