【发布时间】:2026-02-17 02:00:02
【问题描述】:
我有一个 ArrayList,用于存储来自我的 API 的数据 List<GetTestFeeMap> reponseArray =[]; // Storing API response
然后将数据添加到我的 Arraylist ➡ reponseArray.add(getTestFeeObj!);
现在尝试获取每个encTestId。但它只给出第一个值(显然)。 我想传递所有可能在我的列表中的encTestId(到 http 正文)(用逗号分隔。)
getTestFeeObj=GetTestFeeMap.fromJson(jsonResponse);
for (var i = 0; i < reponseArray.length; i++) {
eNcTestIdInList=(reponseArray[i].encTestId)!;
}
然后传递给我的http请求体
body: ({
'EncDoctorId' : eNcTestIdInList,
)}
邮递员中正确正文的示例
{
"EncDoctorId": "I3uXyzcuDZf21SSe5fHnSQ==,7Ch2aVnhokZtRWyJtuDA/A==", // 2 encTestId
}
希望你能理解我的问题。
【问题讨论】: