我需要多次向后端系统发送几乎相同的 POST 请求——比如 50 次。
有没有办法将以下请求放入循环中?
###
#POST Gamer
POST {{hostURL}}/api/Gamer
Content-Type: application/json
{
"username": "User-{{$randomInt 3 1000}}",
"characters": [
{
"name": "Superman",
"rpgClass": "Attacker",
"weapon": {
"name": "Flying",
"damage": 100
},
"characterSkill": [
{
"skillId": 1
},
{
"skillId": 2
}
]
}
]
}
不幸的是,Rest Client 扩展目前似乎不支持循环语句。
虽然在 Github 中有一个 open 与 loop 相关的 issue,但目前仍处于 open 状态。 (截至 2023 年 5 月)