| Package | Description |
|---|---|
| retrofit2 |
Retrofit turns your REST API into a Java interface.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Response<T> |
Response.error(int code,
okhttp3.ResponseBody body)
Create a synthetic error response with an HTTP status code of
code and body
as the error body. |
static <T> Response<T> |
Response.error(okhttp3.ResponseBody body,
okhttp3.Response rawResponse)
Create an error response from
rawResponse with body as the error body. |
Response<T> |
Call.execute()
Synchronously send the request and return its response.
|
Response<?> |
HttpException.response()
The full HTTP response.
|
static <T> Response<T> |
Response.success(int code,
T body)
Create a synthetic successful response with an HTTP status code of
code and
body as the deserialized body. |
static <T> Response<T> |
Response.success(T body)
Create a synthetic successful response with
body as the deserialized body. |
static <T> Response<T> |
Response.success(T body,
okhttp3.Headers headers)
Create a synthetic successful response using
headers with body as the
deserialized body. |
static <T> Response<T> |
Response.success(T body,
okhttp3.Response rawResponse)
Create a successful response from
rawResponse with body as the deserialized
body. |
| Modifier and Type | Method and Description |
|---|---|
void |
Callback.onResponse(Call<T> call,
Response<T> response)
Invoked for a received HTTP response.
|
| Constructor and Description |
|---|
HttpException(Response<?> response) |
Copyright © 2019 Square, Inc.. All rights reserved.