Retrofit's default serialization is JSON so this will basically work out-of-the-box. You can use either a String[]
or List<String>
on the client (I prefer the latter).
@POST("/endpoint")
void sendIds(@Body List<String> ids);
After creating an instance of the service using your RestAdapter
you can pass an existing list of IDs or create one.
service.sendIds(ids);
// .. or ..
service.sendIds(Arrays.asList("foo", "bar"));