Oleh Ponomarenko
04/23/2019, 3:14 PM@POST("api/auth/login")
fun loginAsync(@Body loginRequest: LoginRequest): Deferred<LoginResponse>
data class LoginResponse(
val status: String
)
In my response I don't see it, but it exists.
http://prntscr.com/nfty4z
http://prntscr.com/nftylcrook
04/23/2019, 3:16 PMLoginResponse
object. Retrofit already has a Response<T>
wrapper for any response that comes back with the status field you’re looking for@POST("api/auth/login")
fun loginAsync(@Body loginRequest: LoginRequest): Deferred<Response<ResponseBody>>
val response = loginAsync(LoginRequest()).await()
response.headers()
Oleh Ponomarenko
04/23/2019, 3:20 PM