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

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -