aboutsummaryrefslogtreecommitdiffstats
path: root/examples/simple/add_header_class.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/simple/add_header_class.py')
-rw-r--r--examples/simple/add_header_class.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/simple/add_header_class.py b/examples/simple/add_header_class.py
index 9270be09..419c99ac 100644
--- a/examples/simple/add_header_class.py
+++ b/examples/simple/add_header_class.py
@@ -1,7 +1,9 @@
+from mitmproxy import http
+
+
class AddHeader:
- def response(self, flow):
+ def response(self, flow: http.HTTPFlow) -> None:
flow.response.headers["newheader"] = "foo"
-def start(opts):
- return AddHeader()
+addons = [AddHeader()]