Package discord4j.rest.request
Class ResponseHeaderStrategy
- java.lang.Object
-
- discord4j.rest.request.ResponseHeaderStrategy
-
- All Implemented Interfaces:
RateLimitStrategy
public class ResponseHeaderStrategy extends Object implements RateLimitStrategy
-
-
Constructor Summary
Constructors Constructor Description ResponseHeaderStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Durationapply(HttpClientResponse response)Apply this function to aHttpClientResponseto obtain aDurationrepresenting a delay due to rate limiting.
-
-
-
Method Detail
-
apply
public Duration apply(HttpClientResponse response)
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
-
-