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