Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode REST Client Extension - Loop Request

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
        }
      ]
    }
  ]
}
like image 284
Karthikeyan Vijayakumar Avatar asked Aug 08 '26 08:08

Karthikeyan Vijayakumar


1 Answers

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)

like image 146
Joon Hong Avatar answered Aug 11 '26 00:08

Joon Hong



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!