from mitmproxy import http, ctx def request(flow: http.HTTPFlow) -> None: if flow.request.pretty_host == "api-android.jawbone.com": res = b""" {} """ flow.response = http.Response.make( 200, res, {"Content-Type": "application/json"} )