3

I have the requirement to send nearly the same POST request to a backend system several times - say 50 times.

Is there a way to put the below request into a loop?

###
#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
        }
      ]
    }
  ]
}
One Developer
  • 99
  • 5
  • 43
  • 103

1 Answers1

0

Unfortunately, it seems that the loop statement is currently not supported in Rest Client extension.

While there is an issue opened in Github relevant to loop, it is still in open status at the moment. (as of May 2023)

Joon Hong
  • 1,337
  • 15
  • 23