I\'m looking for way to add an int array (e.g [0,1,3,5]) as parameter in a GET request with retrofit 2. Then, the generated url should be like this : http:/
Well this did the trick for me
Step 1 :
In StateServce.kt
@GET("states/v1")
fun getStatesByCoordinates(@Query("coordinates", encoded = true) coordinates: String) : Call>>
Step 2
While calling from repository
val mCoordinate : List = [22.333, 22.22]
mStateService?.getStatesByCoordinates(mCoordinate.toString().replace(" ", ""))!!