MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / cleanup_response

Function cleanup_response

mitmproxy/addons/export.py:37–43  ·  view source on GitHub ↗
(f: flow.Flow)

Source from the content-addressed store, hash-verified

35
36
37def cleanup_response(f: flow.Flow) -> http.Response:
38 if not getattr(f, "response", None):
39 raise exceptions.CommandError("Can't export flow with no response.")
40 assert isinstance(f, http.HTTPFlow)
41 response = f.response.copy() # type: ignore
42 response.decode(strict=False)
43 return response
44
45
46def request_content_for_console(request: http.Request) -> str:

Callers 1

raw_responseFunction · 0.85

Calls 2

copyMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…