Query
annotation class Query(@Language(value = "http-url-reference"
Query parameter appended to the URL
@GET("comments")
suspend fun getCommentsById(@Query("postId") id: String): List<Comment>
getCommentsById(3)
// Generate comments?postId=3
Content copied to clipboard
@GET("comments")
suspend fun getCommentsById(@Query("postId") postId: List<String?>): List<Comment>
getCommentsById(listOf("3",null,"4"))
// Generate comments?postId=3&postId=4
Content copied to clipboard
A null
values are ignored