diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-08-05 13:26:39 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-08-05 13:26:39 +1200 |
commit | cd0e2f18e6626f5d02ab749a001934a016eee966 (patch) | |
tree | e81b68b5224a3b9f440fc834cee990735f39fe19 /examples | |
parent | 89a58d7e303f00e4ed7572b60db6a2073804c4a1 (diff) | |
download | mitmproxy-cd0e2f18e6626f5d02ab749a001934a016eee966.tar.gz mitmproxy-cd0e2f18e6626f5d02ab749a001934a016eee966.tar.bz2 mitmproxy-cd0e2f18e6626f5d02ab749a001934a016eee966.zip |
First draft of scripting docs.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/add_header.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/add_header.py b/examples/add_header.py index 6ddeab3d..0c0593d1 100644 --- a/examples/add_header.py +++ b/examples/add_header.py @@ -1,6 +1,2 @@ -""" - This script adds a new header to all responses. -""" - -def response(ctx, f): - f.response.headers["newheader"] = ["foo"] +def response(context, flow): + flow.response.headers["newheader"] = ["foo"] |