Retrofit2 - Send dynamic keys with duplicate keys

Viewed 549

I need to send dynamic keys with duplicate keys.

this is what i need:

https://myApi.com/pepole?name=yoni&name=albert&brand=nike

all the keys are dynamics (name, brand).

so to do it dynamically i used @Querymap for exmpale:

Map<String, String> parms = new HashMap<>();

parms.put(dynamicKey, dynamicValue);

parms.put(anotherDynamicKey,anotherDynamicValue);

and this is my interface:

@Get("pepole")
Call<List> searchPepole(
@Querymap Map<String, String> options);

and is working fine but my problem starts when i have duplicate keys.

so how can i make call with dynamic keys with duplicates keys?

0 Answers
Related