I would like to execute several http requests (in one http file) with intellij http client in a loop based on an array of strings in an environment file. Is this possible? If yes, how? Thx, Alex
Yes, its possible. for example this will send 5 GET requests one for each id from an array.
< {%
request.variables.set("id", [1,2,3,4,5])
%}
GET http://localhost:8080/books/{{id}}
You can find more examples in the documentation: https://www.jetbrains.com/help/phpstorm/http-client-variables.html#collections-in-variables
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With