mitmproxy/examples/modify_form.py

6 lines
247 B
Python
Raw Normal View History

2014-09-08 14:02:31 +00:00
def request(context, flow):
if "application/x-www-form-urlencoded" in flow.request.headers["content-type"]:
form = flow.request.get_form_urlencoded()
form["mitmproxy"] = ["rocks"]
flow.request.set_form_urlencoded(form)