# Pre-request collection script does not send request

**URL:** <https://community.postman.com/t/pre-request-collection-script-does-not-send-request/26465>\
**Category:** Help Hub\
**Tags:** collections\
**Created:** [August 5, 2021, 9:18am UTC](https://community.postman.com/t/pre-request-collection-script-does-not-send-request/26465 "2021-08-05T09:18:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![altimetry-participa1](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@altimetry-participa1](https://community.postman.com/u/altimetry-participa1)\
**Post date:** [August 5, 2021, 9:18am UTC](https://community.postman.com/t/pre-request-collection-script-does-not-send-request/26465/1 "2021-08-05T09:18:49Z")

</div>

I have the following code in my collection’s pre-request script:

```auto
utils = {
    test: function (a, b) {
        console.log("asd1")

        pm.sendRequest({ url: 'http://localhost:8082/api/health', method: 'GET' }, (error, response) => {
            console.log("returned")
            if (error) {
                console.log(error);
            } else {
                console.log(response);
            }
        });

        console.log("asd2")
    }
}

```

And in the pre-request script of a single request I have:

```auto
utils.test("a", "b");

```

When I execute the single request, I get the log messages “asd1” and “asd2” but never “returned”  
I verified that the API server was running by using curl locally
