diff options
Diffstat (limited to 'examples/simple/filter_flows.py')
-rw-r--r-- | examples/simple/filter_flows.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/simple/filter_flows.py b/examples/simple/filter_flows.py index fd49425a..70979591 100644 --- a/examples/simple/filter_flows.py +++ b/examples/simple/filter_flows.py @@ -2,12 +2,12 @@ This scripts demonstrates how to use mitmproxy's filter pattern in scripts. """ from mitmproxy import flowfilter -from mitmproxy import ctx +from mitmproxy import ctx, http class Filter: def __init__(self): - self.filter = None + self.filter = None # type: flowfilter.TFilter def configure(self, updated): self.filter = flowfilter.parse(ctx.options.flowfilter) @@ -17,7 +17,7 @@ class Filter: "flowfilter", str, "", "Check that flow matches filter." ) - def response(self, flow): + def response(self, flow: http.HTTPFlow) -> None: if flowfilter.match(self.filter, flow): print("Flow matches filter:") print(flow) |