java - Retrofit generic type call method -
is possible create generic type of calls example
@post("/service/") fun<t> startrequest(@body loginreq: any): call<t>
then call this
val request = api.startrequest<mymodel_1>(loginreq)
when write , run method, says:
java.lang.illegalargumentexception: method return type must not include type variable or wildcard: retrofit2.call<t>
try annotate function @jvmsuppresswildcards
Comments
Post a Comment