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

Function _always_bytes

mitmproxy/http.py:44–45  ·  view source on GitHub ↗
(x: str | bytes)

Source from the content-addressed store, hash-verified

42
43
44def _always_bytes(x: str | bytes) -> bytes:
45 return strutils.always_bytes(x, "utf-8", "surrogateescape")
46
47
48# This cannot be easily typed with mypy yet, so we just specify MultiDict without concrete types.

Callers 5

__init__Method · 0.85
__delitem__Method · 0.85
get_allMethod · 0.85
set_allMethod · 0.85
insertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…