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://server/service?array=[0,1,3,5]
How to do this ?
Just add it as a query param
@GET("http://server/service")
Observable<Void> getSomething(@Query("array") List<Integer> array);
You can also use int[], or Integer... as a last param;