T
- type of the converted response bodypublic final class Response<T>
extends java.lang.Object
The body is in byte form and T
if a ResponseBodyConverter
has been provided.
Modifier and Type | Field and Description |
---|---|
T |
body
Converted body of the response if the request was a success.
|
byte[] |
bytes
Response in plain bytes, may be the error message if the request was a
failure.
|
boolean |
cached
Whether the response is from a cache.
|
int |
code
HTTP status code of the response.
|
java.lang.String |
error
Error message of the response if the request was a failure.
|
Constructor and Description |
---|
Response(int code,
boolean cached,
byte[] bytes,
T body,
java.lang.String error) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isSuccessful() |
java.lang.String |
toString() |
public final int code
public final boolean cached
public final byte[] bytes
public final T body
public final java.lang.String error
public Response(int code, boolean cached, byte[] bytes, T body, java.lang.String error)
public boolean isSuccessful()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object