mitmdump

View, record, and programmatically transform HTTP traffic. The command-line counterpart to mitmproxy. More information: https://docs.mitmproxy.org/stable/#mitmdump.

mitmdump -w path/to/file

mitmdump -nr input_filename -w output_filename "~m post"

mitmdump -nc path/to/file