From 2f44b26b4cd014e03dd62a125d79af9b81663a93 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 3 Sep 2014 23:44:54 +0200 Subject: improve HTTPRequest syntax --- examples/modify_querystring.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/modify_querystring.py') diff --git a/examples/modify_querystring.py b/examples/modify_querystring.py index b1abcc1e..7e3a068a 100644 --- a/examples/modify_querystring.py +++ b/examples/modify_querystring.py @@ -1,7 +1,7 @@ def request(context, flow): - q = flow.request.get_query() + q = flow.request.query if q: q["mitmproxy"] = ["rocks"] - flow.request.set_query(q) + flow.request.query = q -- cgit v1.2.3 From 2a6337343a14f7f72c28d8bf5f24220f6d9ca6d0 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 5 Sep 2014 15:16:20 +0200 Subject: update docs, mostly revert 2f44b26b4cd014e03dd62a125d79af9b81663a93 --- examples/modify_querystring.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/modify_querystring.py') diff --git a/examples/modify_querystring.py b/examples/modify_querystring.py index 7e3a068a..56fbbb32 100644 --- a/examples/modify_querystring.py +++ b/examples/modify_querystring.py @@ -1,7 +1,6 @@ -def request(context, flow): - q = flow.request.query +def request(ctx, flow): + q = flow.request.get_query() if q: q["mitmproxy"] = ["rocks"] - flow.request.query = q - + flow.request.set_query(q) \ No newline at end of file -- cgit v1.2.3