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

Function cleanup_request

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

Source from the content-addressed store, hash-verified

16
17
18def cleanup_request(f: flow.Flow) -> http.Request:
19 if not getattr(f, "request", None):
20 raise exceptions.CommandError("Can't export flow with no request.")
21 assert isinstance(f, http.HTTPFlow)
22 request = f.request.copy()
23 request.decode(strict=False)
24 return request
25
26
27def pop_headers(request: http.Request) -> None:

Callers 3

curl_commandFunction · 0.85
httpie_commandFunction · 0.85
raw_requestFunction · 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…