I use Charles Proxy pretty much nonstop when testing. As a backup I use mitmproxy. It lacks a bit of the polished UI that Charles provides, but it is free and open source. And it gets cool points for being a command line tool.
These notes cover only a fraction of what mitmproxy can do, but is pretty much everything I need most days.
brew install mitmproxy
Start proxy on port 8989
mitmproxy --listen-port 8989 --ssl-insecure --set console_mouse=false
ssl-insecure flag ignores insecure SSL sites, which is common in
a lot of the test environments I use. The
console_mouse option makes it
easier to copy/paste output from the terminal.
Start reverse proxy on port 8989 that directs traffic to port 4001
mitmproxy —-listen-port 8989 —-ssl-insecure -—set console_mouse=false -—mode reverse:http://localhost:4001
enter: select request
z: clear requests