woltapp / mitmproxy-mock

A tool to mock/modify server responses easily with mitmproxy
MIT License
87 stars 12 forks source link

Adding lambda support #3

Open andymillersj opened 3 years ago

andymillersj commented 3 years ago

I wanted to perform a string substitution that could be more dynamic than what was already supported, so I added support for using lambda functions as replacement arguments.

While implementing my changes, I also made a slight modification to encode_content to better handle content passed to it and removed the mitmproxy net import since it is not necessary since this commit.