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

Method prettify

mitmproxy/contentviews/_view_query.py:11–19  ·  view source on GitHub ↗
(
        self,
        data: bytes,
        metadata: Metadata,
    )

Source from the content-addressed store, hash-verified

9 syntax_highlight = "yaml"
10
11 def prettify(
12 self,
13 data: bytes,
14 metadata: Metadata,
15 ) -> str:
16 if not isinstance(metadata.http_message, http.Request):
17 raise ValueError("Not an HTTP request.")
18 items = metadata.http_message.query.items(multi=True)
19 return yaml_dumps(merge_repeated_keys(items))
20
21 def render_priority(
22 self,

Callers

nothing calls this directly

Calls 3

yaml_dumpsFunction · 0.85
merge_repeated_keysFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected