class Response<T : Any!>
An HTTP response.
fun body(): T?
The deserialized response body of a successful response. |
|
fun code(): Int
HTTP status code. |
|
static fun <T : Any!> error(code: Int, body: ResponseBody!): Response<T>!
Create a synthetic error response with an HTTP status code of static fun <T : Any!> error(body: ResponseBody!, rawResponse: Response!): Response<T>!
Create an error response from |
|
fun errorBody(): ResponseBody?
The raw response body of an unsuccessful response. |
|
fun headers(): Headers!
HTTP headers. |
|
fun isSuccessful(): Boolean
Returns true if |
|
fun message(): String!
HTTP status message or null if unknown. |
|
fun raw(): Response!
The raw response from the HTTP client. |
|
static fun <T : Any!> success(body: T?): Response<T>!
Create a synthetic successful response with static fun <T : Any!> success(code: Int, body: T?): Response<T>!
Create a synthetic successful response with an HTTP status code of static fun <T : Any!> success(body: T?, headers: Headers!): Response<T>!
Create a synthetic successful response using static fun <T : Any!> success(body: T?, rawResponse: Response!): Response<T>!
Create a successful response from |
|
fun toString(): String |