mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Update modify_form example to not use deprecated functions
This commit is contained in:
parent
e74e212a7a
commit
106b296871
@ -1,5 +1,5 @@
|
||||
def request(context, flow):
|
||||
if "application/x-www-form-urlencoded" in flow.request.headers.get("content-type", ""):
|
||||
form = flow.request.get_form_urlencoded()
|
||||
form = flow.request.urlencoded_form
|
||||
if form is not None:
|
||||
form["mitmproxy"] = ["rocks"]
|
||||
flow.request.set_form_urlencoded(form)
|
||||
flow.request.urlencoded_form = form
|
||||
|
Loading…
Reference in New Issue
Block a user