【发布时间】:2016-04-06 03:21:04
【问题描述】:
我需要从 RetroFit 生成以下查询字符串。我知道我可以很容易地重复查询元素。只需对其进行格式化,以便每个元素都采用assessment[id][points]=parameter
的形式//Assume Assessment contains the id and the parameter
@PUT("url")
Call putElements(@Query(???) Assessment... assessmentIds);
示例输出: https://baseurl.com/url?assessment[id1][points]=3&assessment[id2][points]=5
RetroFit 中是否有一种简洁的方法来完成此任务?
【问题讨论】: