# \#asynchronous

**URL:** https://community.postman.com/tag/asynchronous/114.md

[Latest](https://community.postman.com/latest.md) · [Categories](https://community.postman.com/categories.md) · [Tags](https://community.postman.com/tags.md)

---

## [Pre-request async code doesn't wait for execution](https://community.postman.com/t/pre-request-async-code-doesnt-wait-for-execution/44366)

<div class="topic-metadata">

**Author:** [@ahussain.ned](https://community.postman.com/u/ahussain.ned)\
**Replies:** 2\
**Last updated:** [October 3, 2023, 2:07am UTC](https://community.postman.com/t/pre-request-async-code-doesnt-wait-for-execution/44366 "2023-10-03T02:07:43Z")

</div>

Hi, One of my requirement is to call an async login API as a pre-request script in Postman windows client. Through this code I want to set the collection variable (jwt-token). The problem is that Postman doesn’t wait fo…

---

## [Using native javascript promises in postman](https://community.postman.com/t/using-native-javascript-promises-in-postman/636)

<div class="topic-metadata">

**Author:** [@aksbenz](https://community.postman.com/u/aksbenz)\
**Replies:** 15\
**Last updated:** [January 6, 2023, 1:49am UTC](https://community.postman.com/t/using-native-javascript-promises-in-postman/636 "2023-01-06T01:49:40Z")

</div>

Hi, Javascript and node now has native support for Promises. I was hoping we could use these in Postman and newman as well to chain async sendRequest calls. Although declaring and using new Promise works but chaining d…

---

## [How to wait for an async pm.sendRequest to complete?](https://community.postman.com/t/how-to-wait-for-an-async-pm-sendrequest-to-complete/29047)

<div class="topic-metadata">

**Author:** [@felipe.pazinatto](https://community.postman.com/u/felipe.pazinatto)\
**Replies:** 0\
**Last updated:** [October 24, 2021, 2:40pm UTC](https://community.postman.com/t/how-to-wait-for-an-async-pm-sendrequest-to-complete/29047 "2021-10-24T14:40:03Z")

</div>

Hi there, I\`m testing an API for which I POST a document, then need to check for the confirmation messages generated, this is the code: function validateDocumentMessage(expectedDocumentMessage) { var hasLegalStatus…

---

## [Can I use pm.sendRequest to send request synchronously ? or turn asynchronous mode?](https://community.postman.com/t/can-i-use-pm-sendrequest-to-send-request-synchronously-or-turn-asynchronous-mode/10580)

<div class="topic-metadata">

**Author:** [@srreddam](https://community.postman.com/u/srreddam)\
**Replies:** 0\
**Last updated:** [February 5, 2020, 3:14pm UTC](https://community.postman.com/t/can-i-use-pm-sendrequest-to-send-request-synchronously-or-turn-asynchronous-mode/10580 "2020-02-05T15:14:48Z")

</div>

I know it always sends asynchronously. Can we use pm.sendRequest to send requests synchronously. Can we turn off the asynchronous sends in our test. I want to send 2nd request only after 1st request is successfully com…

---

## [Delay test result until process completes](https://community.postman.com/t/delay-test-result-until-process-completes/6260)

<div class="topic-metadata">

**Author:** [@hpack](https://community.postman.com/u/hpack)\
**Replies:** 1\
**Last updated:** [July 2, 2019, 9:40pm UTC](https://community.postman.com/t/delay-test-result-until-process-completes/6260 "2019-07-02T21:40:07Z")

</div>

I use a POST request to initiate a flow which calls several APIs. The POST request returns a progress URL in its body, and that progress URL has a JSON key, “state”, which indicates whether all the APIs have been called…
