<How to use Retrofit @Tag with Kotlin primitives?>...
# stackoverflow
r
How to use Retrofit @Tag with Kotlin primitives? I'm trying to use @Tag with Kotlin primitives. @POST("/api") suspend fun post( @Tag a: Boolean, @Tag b: Int? = null, ... ) However, when I call this function, I get the following errors: java.lang.ClassCastException: java.lang.Boolean cannot be cast to boolean at java.lang.Class.cast(Class.java:1731) at okhttp3.Request$Builder.tag(Request.kt:283) at...