mitmproxy/examples/nonblocking.py

10 lines
296 B
Python
Raw Normal View History

import time
from libmproxy.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)
2015-05-30 00:03:28 +00:00
print "start request: %s%s" % (flow.request.host, flow.request.path)