aboutsummaryrefslogtreecommitdiffstats
path: root/examples/modify_form.py
blob: 2d839aed297b167e4e044009974525b629374873 (plain)
1
2
3
4
5
6
7
8
def request(context, flow):
    if "application/x-www-form-urlencoded" in flow.request.headers["content-type"]:
        frm = flow.request.get_form_urlencoded()
        frm["mitmproxy"] = ["rocks"]
        flow.request.set_form_urlencoded(frm)