Delaying chosen responses without affecting other requests


#1

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?