| Package | Description |
|---|---|
| retrofit2 |
Retrofit turns your REST API into a Java interface.
|
| retrofit2.adapter.guava | |
| retrofit2.adapter.java8 | |
| retrofit2.adapter.rxjava | |
| retrofit2.adapter.rxjava2 | |
| retrofit2.mock |
| 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(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) |
| Constructor and Description |
|---|
HttpException(Response<?> response)
Deprecated.
|
| Constructor and Description |
|---|
HttpException(Response<?> response)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Response<T> |
Result.response()
The response received from executing an HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Result<T> |
Result.response(Response<T> response) |
| Constructor and Description |
|---|
HttpException(Response<?> response)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Response<T> |
Result.response()
The response received from executing an HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Result<T> |
Result.response(Response<T> response) |
| Constructor and Description |
|---|
HttpException(Response<?> response)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Response<?> |
NetworkBehavior.createErrorResponse()
The HTTP error to be used when an error is triggered.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Call<T> |
Calls.response(Response<T> response) |
| Modifier and Type | Method and Description |
|---|---|
void |
NetworkBehavior.setErrorFactory(Callable<Response<?>> errorFactory)
Set the error response factory to be used when an error is triggered.
|
Copyright © 2017 Square, Inc.. All rights reserved.