mitmproxy/examples/modify_form.py

9 lines
238 B
Python
Raw Normal View History

def request(context, flow):
if "application/x-www-form-urlencoded" in flow.request.headers["content-type"]:
2014-09-03 21:44:54 +00:00
frm = flow.request.form_urlencoded
frm["mitmproxy"] = ["rocks"]
2014-09-03 21:44:54 +00:00
flow.request.form_urlencoded = frm