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

Method set_all

mitmproxy/http.py:158–165  ·  view source on GitHub ↗

Explicitly set multiple headers for the given key. See `Headers.get_all`.

(self, name: str | bytes, values: Iterable[str | bytes])

Source from the content-addressed store, hash-verified

156 return [_native(x) for x in super().get_all(name)]
157
158 def set_all(self, name: str | bytes, values: Iterable[str | bytes]):
159 """
160 Explicitly set multiple headers for the given key.
161 See `Headers.get_all`.
162 """
163 name = _always_bytes(name)
164 values = [_always_bytes(x) for x in values]
165 return super().set_all(name, values)
166
167 def insert(self, index: int, key: str | bytes, value: str | bytes):
168 key = _always_bytes(key)

Callers 7

test_get_header_tokensFunction · 0.95
test_set_allMethod · 0.45
_set_cookiesMethod · 0.45
refreshMethod · 0.45
responseFunction · 0.45
responseFunction · 0.45

Calls 1

_always_bytesFunction · 0.85

Tested by 3

test_get_header_tokensFunction · 0.76
test_set_allMethod · 0.36