2014-09-08 14:02:31 +00:00
|
|
|
def request(context, flow):
|
2016-05-19 05:50:19 +00:00
|
|
|
if flow.request.urlencoded_form:
|
2016-05-19 01:46:42 +00:00
|
|
|
flow.request.urlencoded_form["mitmproxy"] = "rocks"
|
|
|
|
else:
|
|
|
|
# This sets the proper content type and overrides the body.
|
|
|
|
flow.request.urlencoded_form = [
|
|
|
|
("foo", "bar")
|
|
|
|
]
|