mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-02 10:47:14 +00:00
Add an example showing the new form API.
This commit is contained in:
parent
3f6619ff59
commit
bc3bf969ba
2 changed files with 9 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
add_header.py Simple script that just adds a header to every request.
|
||||
flowbasic Basic use of mitmproxy as a library.
|
||||
modify_form.py Modify all form submissions to add a parameter.
|
||||
stub.py Script stub with a method definition for every event.
|
||||
stickycookies An example of writing a custom proxy with libmproxy.
|
||||
upsidedownternet.py Rewrites traffic to turn PNGs upside down.
|
||||
|
||||
|
|
|
|||
8
examples/modify_form.py
Normal file
8
examples/modify_form.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
def request(context, flow):
|
||||
if "application/x-www-form-urlencoded" in flow.request.headers["content-type"]:
|
||||
frm = flow.request.get_form_urlencoded()
|
||||
frm["mitmproxy"] = ["rocks"]
|
||||
flow.request.set_form_urlencoded(frm)
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue