mitmproxy/examples/modify_form.py
2016-02-18 09:27:08 +13:00

6 lines
255 B
Python

def request(context, flow):
if "application/x-www-form-urlencoded" in flow.request.headers.get("content-type", ""):
form = flow.request.get_form_urlencoded()
form["mitmproxy"] = ["rocks"]
flow.request.set_form_urlencoded(form)