我是邮递员的新手,我想知道如何从JSON文件声明请求正文,而JSON文件是我使用集合运行器多次迭代传递请求正文中的值/数据的同一个文件。
如果有人可以帮助我提出这个主张,将不胜感激...
在此处输入代码
我的JSON输入文件:
[
{
"POLCODE":"APOL279906",
"EnrolmentSegmentValue":"ADF",
"startDate":"2019-12-01",
}
]
请求正文:
[
{
"code": "{{POLCODE}}",
"brandCode": " ",
"lineOfBusinessCode": "HEALTH_INSURANCE",
"enrolmentSegment": [
{
"value": "{{EnrolmentSegmentValue}}",
"startDate": "{{startDate}}",
"endDate": ""
}
]
}
]
响应正文:
{
"saleDate": "2019-12-01",
"calculateOnCancellation": false,
"code": "APOL279906",
"brandCode": " ",
"lineOfBusinessCode": "HEALTH_INSURANCE",
"rebateApplicant": [{
"startDate": "2019-12-01",
"declarationDate": "2019-12-01"
}],
"enrolmentSegment": [{
"flexCodeDefinitionCode": "ENROLMENT_SEGMENTS",
"startDate": "2019-12-01",
"value": "ADF"
}]
}
答案 0 :(得分:0)
我通过探索POSTMAN帮助查询来弄清楚。