【发布时间】:2022-01-23 07:24:30
【问题描述】:
我在下面有这个网址
在我的界面中
@GET("storage/presigned-url?bucketName=files&key=payment-receipt/{fileName}&httpVerb=2&contentType=image/jpeg")
suspend fun fileUploadPathCheque(@Path("fileName") name: String): Response<String>
我想用某个值替换文件名
我将函数调用为
Api.fileUploadPathCheque(UUID.randomUUID().toString().plus(".jpg"))
我得到以下异常
ava.lang.IllegalArgumentException: URL query string "bucketName=files&key=payment-receipt/{fileName}&httpVerb=2&contentType=image/jpeg" must not have replace block. For dynamic query parameters use @Query.
正确的做法应该是什么?
【问题讨论】:
标签: android retrofit illegalargumentexception