Yon*_*oni 5 android retrofit retrofit2
我需要发送带有重复键的动态键。
这就是我需要的:
https://myApi.com/pepole?name=yoni&name=albert&brand=nike
Run Code Online (Sandbox Code Playgroud)
所有的关键都是动态(名称,品牌)。
所以要动态地做到这一点,我用于@Querymap示例:
Map<String, String> parms = new HashMap<>();
parms.put(dynamicKey, dynamicValue);
parms.put(anotherDynamicKey,anotherDynamicValue);
Run Code Online (Sandbox Code Playgroud)
这是我的界面:
@Get("pepole")
Call<List> searchPepole(
@Querymap Map<String, String> options);
Run Code Online (Sandbox Code Playgroud)
并且工作正常,但是当我有重复的密钥时,我的问题就开始了。
那么如何使用带有重复键的动态键进行呼叫?
| 归档时间: |
|
| 查看次数: |
430 次 |
| 最近记录: |