mitmproxy/examples/nonblocking.py

10 lines
298 B
Python
Raw Normal View History

import time
from mitmproxy.script import concurrent
2014-09-08 14:02:31 +00:00
@concurrent # Remove this and see what happens
def request(context, flow):
print("handle request: %s%s" % (flow.request.host, flow.request.path))
time.sleep(5)
print("start request: %s%s" % (flow.request.host, flow.request.path))