Via okhttp3.Request#tag(Invocation::class.java), we can get methodName, annotations etc. Is there any way to get the method's return type using Invocation class.
I've tried
request.tag(Invocation::class.java)!!.method().returnTyperequest.tag(Invocation::class.java)!!.method().genericReturnType
but both of them simply return class java.lang.Object, even it's a List.
Expected Output
@GET("products")
suspend fun getProducts(): List<Product> // I need to get at least `List` as a String for this method
@GET("product")
suspend fun getProduct(): Product // I need to get at least `Object` as a String for this method