Package net.dv8tion.jda.api.requests
Class Request<T>
java.lang.Object
net.dv8tion.jda.api.requests.Request<T>
- Type Parameters:
T
- The expected type of the response
Internal class used for representing HTTP requests.
-
Constructor Summary
ConstructorDescriptionRequest
(net.dv8tion.jda.internal.requests.RestActionImpl<T> restAction, Consumer<? super T> onSuccess, Consumer<? super Throwable> onFailure, BooleanSupplier checks, boolean shouldQueue, okhttp3.RequestBody body, Object rawBody, long deadline, boolean priority, Route.CompiledRoute route, org.apache.commons.collections4.map.CaseInsensitiveMap<String, String> headers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
createErrorResponseException
(Response response) okhttp3.RequestBody
getBody()
net.dv8tion.jda.internal.JDAImpl
getJDA()
getRoute()
void
handleResponse
(Response response) boolean
boolean
boolean
void
void
void
void
onRateLimited
(Response response) void
void
boolean
-
Constructor Details
-
Request
public Request(net.dv8tion.jda.internal.requests.RestActionImpl<T> restAction, Consumer<? super T> onSuccess, Consumer<? super Throwable> onFailure, BooleanSupplier checks, boolean shouldQueue, okhttp3.RequestBody body, Object rawBody, long deadline, boolean priority, Route.CompiledRoute route, org.apache.commons.collections4.map.CaseInsensitiveMap<String, String> headers)
-
-
Method Details
-
onSuccess
-
onFailure
-
onRateLimited
-
createErrorResponseException
-
onFailure
-
onCancelled
public void onCancelled() -
onTimeout
public void onTimeout() -
getJDA
-
getRestAction
-
getOnSuccess
-
getOnFailure
-
isPriority
public boolean isPriority() -
isSkipped
public boolean isSkipped() -
getHeaders
-
getRoute
-
getBody
-
getRawBody
-
shouldQueue
public boolean shouldQueue() -
cancel
public void cancel() -
isCancelled
public boolean isCancelled() -
handleResponse
-