mitmproxy/examples/modify_form.py
2014-09-05 15:16:20 +02:00

6 lines
243 B
Python

def request(ctx, 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)