//NetworkResponseAdapter/com.haroldadmin.cnradapter/NetworkResponse/Success
Success
[jvm]\ data class Success<S, E>(body: S, response: Response<*>) : NetworkResponse<S, E>
The result of a successful network request.
If you expect your server response to not contain a body, set the success body type (S) to Unit. If you expect your server response to sometimes not contain a body (e.g. for response code 204), set S to Unit and deserialize the raw response manually when needed.
Parameters
jvm
| body | The parsed body of the successful response. |
| response | The original Response from Retrofit |
Constructors
| Success | [jvm] fun <S> Success(body: S, response: Response<*>) |
Properties
| Name | Summary |
|---|---|
| body | [jvm] val body: S |
| code | [jvm] val code: Int The status code returned by the server. |
| headers | [jvm] val headers: Headers The headers returned by the server. |
| response | [jvm] val response: Response<*> |