aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/examples/modify_form.py
blob: 3e9d15c008528078e87d8bc4edafb48d7283004c (plain)
1
2
3
4
5
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)