# How to create a correct sequence of requests with looping?

**URL:** <https://community.gatling.io/t/how-to-create-a-correct-sequence-of-requests-with-looping/7043>\
**Category:** Gatling (Open-Source)\
**Created:** [August 9, 2022, 1:43pm UTC](https://community.gatling.io/t/how-to-create-a-correct-sequence-of-requests-with-looping/7043 "2022-08-09T13:43:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![GeMi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/gemi/32/939_2.png) [@GeMi](https://community.gatling.io/u/GeMi)\
**Post date:** [August 9, 2022, 1:57pm UTC](https://community.gatling.io/t/how-to-create-a-correct-sequence-of-requests-with-looping/7043/2 "2022-08-09T13:57:38Z")

</div>

Maybe this will help you:

> [@How to simulate an asynchronous request executing many times?](https://community.gatling.io/t/how-to-simulate-an-asynchronous-request-executing-many-times/7031/3):
>
> I’m not sure what you want to achieve but I have for your case 2 propositions: After main request are generated additional requests sequentially based on the generated number of them: package pl.gemiusz; import io.gatling.javaapi.core.ScenarioBuilder; import io.gatling.javaapi.core.Simulation; import io.gatling.javaapi.http.HttpProtocolBuilder; import io.netty.util.internal.ThreadLocalRandom; import java.util.Collections; import java.util.Iterator; import java.util.Map; import java.util.fun…

---

_[View the full topic](https://community.gatling.io/t/how-to-create-a-correct-sequence-of-requests-with-looping/7043)._
