Package discord4j.rest.request
Class ResponseHeaderStrategy
java.lang.Object
discord4j.rest.request.ResponseHeaderStrategy
- All Implemented Interfaces:
RateLimitStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(HttpClientResponse response) Apply this function to aHttpClientResponseto obtain aDurationrepresenting a delay due to rate limiting.
-
Constructor Details
-
ResponseHeaderStrategy
public ResponseHeaderStrategy()
-
-
Method Details
-
apply
Description copied from interface:RateLimitStrategyApply this function to aHttpClientResponseto obtain aDurationrepresenting a delay due to rate limiting.- Specified by:
applyin interfaceRateLimitStrategy- Parameters:
response- the originalHttpClientResponse- Returns:
- a
Durationindicating rate limiting, can beDuration.ZEROif no limit is present
-