# Pre-request Script: About await

**URL:** <https://community.postman.com/t/pre-request-script-about-await/22446>\
**Category:** Help Hub\
**Tags:** pre-request-script\
**Created:** [April 9, 2021, 10:34am UTC](https://community.postman.com/t/pre-request-script-about-await/22446 "2021-04-09T10:34:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.lee](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@steven.lee](https://community.postman.com/u/steven.lee)\
**Post date:** [April 9, 2021, 10:34am UTC](https://community.postman.com/t/pre-request-script-about-await/22446/1 "2021-04-09T10:34:51Z")

</div>

Hello! I am steven.

> [@Executing sync requests programmatically from a pre-request or test scripts](https://community.postman.com/t/executing-sync-requests-programmatically-from-a-pre-request-or-test-scripts/14678/2):
>
> Hi @tmladenov_atos, Is this just about control flow aesthetics and avoiding “callback hell”? If so, you can use async/await style JavaScript syntax in the Postman Sandbox. It just requires a little hack. The Postman Sandbox detects open timeouts and intervals and awaits execution until they’re all cleared/resolved. If we use a dummy Interval object, we can use async/await to have a cleaner method of chaining asynchronous calls. Example: const \_dummy = setInterval(() =\> {}, 300000); functi…

This issue has already been closed, but I’m curious.

**Why the postman-sandbox library quit when it meets the first await?**  
Is there such code?  
Is it intended?

---

<div class="post-metadata">

**Author:** ![meenakshi.dhanani](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/meenakshi.dhanani/32/5980_2.png) [@meenakshi.dhanani](https://community.postman.com/u/meenakshi.dhanani)\
**Post date:** [April 9, 2021, 12:25pm UTC](https://community.postman.com/t/pre-request-script-about-await/22446/2 "2021-04-09T12:25:13Z")

</div>

Hey @steven.lee,  
Interesting question. It’s difficult though for a reader to gain complete context. Are you referring to an existing thread/conversation? If so, could you share that, please? That would make it much simpler for a member to respond.

Also, a big big welcome to the community 👋🏻

---

<div class="post-metadata">

**Author:** ![steven.lee](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@steven.lee](https://community.postman.com/u/steven.lee)\
**Post date:** [April 12, 2021, 2:20am UTC](https://community.postman.com/t/pre-request-script-about-await/22446/3 "2021-04-12T02:20:52Z")

</div>

Oh! I’m sorry about that.  
I added the thread in my post. Thank you!
