diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-03-16 11:12:56 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-03-16 11:12:56 +1300 |
commit | d51b8cab0c0d1352865155865dfd258f66103ffe (patch) | |
tree | f5e950d77224908da351d5d809486d3c0c9c1588 /scripts | |
parent | 8d662e6636b534bdb9fd2f2312589b6e8e453378 (diff) | |
download | mitmproxy-d51b8cab0c0d1352865155865dfd258f66103ffe.tar.gz mitmproxy-d51b8cab0c0d1352865155865dfd258f66103ffe.tar.bz2 mitmproxy-d51b8cab0c0d1352865155865dfd258f66103ffe.zip |
Add a decoded context manager.
This simplifies a common chore when modifying traffic - decoding the object,
modifying it, then re-encoding it with the same encoding afterwards. You can
now simply say:
with flow.decoded(request):
request.content = "bar"
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions