# Delaying chosen responses without affecting other requests

**URL:** <https://discourse.mitmproxy.org/t/delaying-chosen-responses-without-affecting-other-requests/1157>\
**Category:** help\
**Created:** [August 5, 2018, 10:52am UTC](https://discourse.mitmproxy.org/t/delaying-chosen-responses-without-affecting-other-requests/1157 "2018-08-05T10:52:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KORraN](https://avatars.discourse-cdn.com/v4/letter/k/ecae2f/32.png) [@KORraN](https://discourse.mitmproxy.org/u/KORraN)\
**Post date:** [August 5, 2018, 10:52am UTC](https://discourse.mitmproxy.org/t/delaying-chosen-responses-without-affecting-other-requests/1157/1 "2018-08-05T10:52:26Z")

</div>

Hello guys,

I have an app that does some kind of response test by asking a few available servers for a file (asynchronously, all servers at once). What I would like to achieve is to hold response from one server to make sure that this specific server will be the slowest one. I tried putting in my script something like:

```
if flow.request.url == "https://myserver.com/file":
    time.sleep(0.5)

```

but this seems to be putting to sleep whole proxy. Any ideas how can I achieve such a delayed response?
