@POST("/driver/login")
suspend fun login(@Body param:Map<String,Any>): Result<String>
ex:
{
var param= mapOf(
"password" to "123123",
"phone" to "123456789")
service.login(param)
}
use Map
throwabel is < java.lang.IllegalArgumentException: Parameter type must not include a type variable or wildcard: java.util.Map
For now you should be able to add @JvmSuppressWildcard to the parameter to
work around the issue. I'll see about relaxing the restrictions.
On Fri, Jan 3, 2020 at 4:30 AM jikun2008 notifications@github.com wrote:
@POST("/driver/login")
suspend fun login(@Body param:Map): Result ex:
{ var param= mapOf( "password" to "123123", "phone" to "123456789")
service.login(param) }use Map
when use it case Throwable
throwabel is < java.lang.IllegalArgumentException: Parameter type must not
include a type variable or wildcard: java.util.Map
(parameter #1 https://github.com/square/retrofit/issues/1) >—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/square/retrofit/issues/3275?email_source=notifications&email_token=AAAQIEMBV27JCN6MALWKWMTQ34ASPA5CNFSM4KCLLQ7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ID2YAZA,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAQIEI63FNK4I6JUNVFDWLQ34ASPANCNFSM4KCLLQ7A
.
*@JvmSuppressWildcards
Most helpful comment
For now you should be able to add @JvmSuppressWildcard to the parameter to
work around the issue. I'll see about relaxing the restrictions.
On Fri, Jan 3, 2020 at 4:30 AM jikun2008 notifications@github.com wrote: