retrofit / retrofit2 / Response / success

success

static fun <T : Any!> success(@Nullable body: T?): Response<T>!

Create a synthetic successful response with body as the deserialized body.

static fun <T : Any!> success(code: Int, @Nullable body: T?): Response<T>!

Create a synthetic successful response with an HTTP status code of code and body as the deserialized body.

static fun <T : Any!> success(@Nullable body: T?, headers: Headers!): Response<T>!

Create a synthetic successful response using headers with body as the deserialized body.

static fun <T : Any!> success(@Nullable body: T?, rawResponse: Response!): Response<T>!

Create a successful response from rawResponse with body as the deserialized body.