mitmproxy/examples/modify_form.py
2015-05-30 12:03:28 +12:00

8 lines
261 B
Python

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)