public final class Result<T>
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Throwable |
error()
The error experienced while attempting to execute an HTTP request.
|
static <T> Result<T> |
error(java.lang.Throwable error) |
boolean |
isError()
true if the request resulted in an error. |
Response<T> |
response()
The response received from executing an HTTP request.
|
static <T> Result<T> |
response(Response<T> response) |
java.lang.String |
toString() |
public static <T> Result<T> error(java.lang.Throwable error)
public Response<T> response()
isError() is
false, null otherwise.public java.lang.Throwable error()
isError() is true, null otherwise.
If the error is an IOException then there was a problem with the transport to the
remote server. Any other exception type indicates an unexpected failure and should be
considered fatal (configuration error, programming error, etc.).public boolean isError()
true if the request resulted in an error. See error() for the cause.public java.lang.String toString()
toString 在类中 java.lang.Object