public class RatelimitedHttpClient extends HttpClient
| Constructor and Description |
|---|
RatelimitedHttpClient(UserAgent userAgent,
String apiKey)
Creates a new instance of the client.
|
RatelimitedHttpClient(UserAgent userAgent,
String baseUrl,
String apiKey)
Creates a new instance of the client.
|
RatelimitedHttpClient(UserAgent userAgent,
String baseUrl,
String apiKey,
long timeout)
Creates a new instance of the client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
interceptResponse(okhttp3.Response response)
Intercepts the response.
|
CompletableFuture<Void> |
nextRequest()
Returns the next request.
|
connect, connect, executepublic RatelimitedHttpClient(UserAgent userAgent, String apiKey)
userAgent - The user agent to use.apiKey - The API key to use.public RatelimitedHttpClient(UserAgent userAgent, String baseUrl, String apiKey)
userAgent - The user agent to use.baseUrl - The base URL to use.apiKey - The API key to use.public RatelimitedHttpClient(UserAgent userAgent, String baseUrl, String apiKey, long timeout)
userAgent - The user agent to use.baseUrl - The base URL to use.apiKey - The API key to use.timeout - The timeout to use in milliseconds.public CompletableFuture<Void> nextRequest()
nextRequest in class HttpClientpublic void interceptResponse(okhttp3.Response response)
interceptResponse in class HttpClientresponse - - The response to intercept.Copyright © 2026. All rights reserved.