MCPcopy
hub / github.com/mitmproxy/mitmproxy / request

Function request

examples/addons/shutdown.py:18–22  ·  view source on GitHub ↗
(flow: http.HTTPFlow)

Source from the content-addressed store, hash-verified

16
17
18def request(flow: http.HTTPFlow) -> None:
19 # a random condition to make this example a bit more interactive
20 if flow.request.pretty_url == "http://example.com/path":
21 logging.info("Shutting down everything...")
22 ctx.master.shutdown()

Callers

nothing calls this directly

Calls 2

infoMethod · 0.80
shutdownMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…