In my android app:
Here my interface method:
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
@GET("traders/json")
suspend fun getTraidersList(): Response<List<Trader>>
Nice.
but I need to add 2 my custom properties to retrofit2.Response
e.g.
val isCorrect : boolean
val myCustom : MyCustomClass
I want to set/get
this properties. Smt like this:
val response: Response<List<Trader>> = TransportService.getTraidersList()
if (response.isCorrect) {
// do some logic
}
val myCustom = response.getMyCustom()
Is is possible in Kotlin?