I'm using mitmproxy HTTPS proxy. https://mitmproxy.org/
Mitmproxy is an open source proxy application that allows intercepting HTTP and HTTPS connections between any HTTP(S) client. It allows to monitor, capture and alter these connections in realtime. Change request, response, header, ...
Additionally you can intercept different requests.
e.g. response_delay.py:
from mitmproxy import http
from time import sleep
def response(flow: http.HTTPFlow) -> None:
sleep(5.0)
Then executing this comment delays all responses from the server:
mitmproxy --cert \*.asdf.at=./cert.pem --scripts response_delay.py
In my app I'm using certificate pinning, so you need to add the certificate (private + public)
cat private.key public.key > cert.pem
You can find a simple Tutorial here.
You can find other scripting examples here.