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
Modifier and TypeFieldDescriptionfinal int
static final int
static final String
static final IOFunction
<BufferedReader, DataArray> static final IOFunction
<BufferedReader, DataObject> final String
final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
<T> T
get
(Class<T> clazz, IOFunction<BufferedReader, T> parser) getArray()
okhttp3.Response
boolean
isError()
boolean
isOk()
boolean
optArray()
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-