Package net.dv8tion.jda.api.requests
Class Response
java.lang.Object
net.dv8tion.jda.api.requests.Response
- All Implemented Interfaces:
Closeable,AutoCloseable
Internal class used to represent HTTP responses or request failures.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intstatic final intstatic final Stringstatic final IOFunction<BufferedReader,DataArray> static final IOFunction<BufferedReader,DataObject> final Stringfinal long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<T> Tget(Class<T> clazz, IOFunction<BufferedReader, T> parser) getArray()okhttp3.ResponsebooleanisError()booleanisOk()booleanoptArray()toString()
-
Field Details
-
ERROR_CODE
public static final int ERROR_CODE- See Also:
-
ERROR_MESSAGE
- See Also:
-
JSON_SERIALIZE_OBJECT
-
JSON_SERIALIZE_ARRAY
-
code
public final int code -
message
-
retryAfter
public final long retryAfter
-
-
Constructor Details
-
Response
-
Response
-
Response
-
Response
-
-
Method Details
-
getArray
-
optArray
-
getObject
-
optObject
-
getString
-
get
-
getRawResponse
-
getCFRays
-
getException
-
isError
public boolean isError() -
isOk
public boolean isOk() -
isRateLimit
public boolean isRateLimit() -
toString
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-