aboutsummaryrefslogtreecommitdiffstats
path: root/examples/simple/add_header_class.py
diff options
context:
space:
mode:
authorharsh vijay <iharsh234@gmail.com>2017-04-29 03:26:14 +0530
committerGitHub <noreply@github.com>2017-04-29 03:26:14 +0530
commit36118973d98f1afa81e79a846f595a7c4782ff9a (patch)
tree36649bb0b9737548b9b33fd7eac2c359ce1d2d83 /examples/simple/add_header_class.py
parentb537997f4f5d7c33562414a414913b6cd89f99c3 (diff)
downloadmitmproxy-36118973d98f1afa81e79a846f595a7c4782ff9a.tar.gz
mitmproxy-36118973d98f1afa81e79a846f595a7c4782ff9a.tar.bz2
mitmproxy-36118973d98f1afa81e79a846f595a7c4782ff9a.zip
extend mypy example/simple
Diffstat (limited to 'examples/simple/add_header_class.py')
-rw-r--r--examples/simple/add_header_class.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/simple/add_header_class.py b/examples/simple/add_header_class.py
index 5d5c7902..419c99ac 100644
--- a/examples/simple/add_header_class.py
+++ b/examples/simple/add_header_class.py
@@ -1,5 +1,8 @@
+from mitmproxy import http
+
+
class AddHeader:
- def response(self, flow):
+ def response(self, flow: http.HTTPFlow) -> None:
flow.response.headers["newheader"] = "foo"