MCPcopy
hub / github.com/tornadoweb/tornado / get_all

Method get_all

tornado/httputil.py:235–243  ·  view source on GitHub ↗

Returns an iterable of all (name, value) pairs. If a header has multiple values, multiple pairs will be returned with the same name.

(self)

Source from the content-addressed store, hash-verified

233 return self._as_list.get(norm_name, [])
234
235 def get_all(self) -> Iterable[Tuple[str, str]]:
236 """Returns an iterable of all (name, value) pairs.
237
238 If a header has multiple values, multiple pairs will be
239 returned with the same name.
240 """
241 for name, values in self._as_list.items():
242 for value in values:
243 yield (name, value)
244
245 def parse_line(self, line: str, *, _chars_are_bytes: bool = True) -> None:
246 r"""Updates the dictionary with a single header line.

Callers 15

__str__Method · 0.95
test_header_reuseMethod · 0.95
test_pickle_roundtripMethod · 0.95
test_setdefaultMethod · 0.95
_curl_setup_requestMethod · 0.80
headers_receivedMethod · 0.80
__init__Method · 0.80
write_headersMethod · 0.80
getMethod · 0.80
prepareMethod · 0.80
test_multi_lineMethod · 0.80

Calls 1

itemsMethod · 0.80

Tested by 11

test_header_reuseMethod · 0.76
test_pickle_roundtripMethod · 0.76
test_setdefaultMethod · 0.76
getMethod · 0.64
prepareMethod · 0.64
test_multi_lineMethod · 0.64
test_unicode_newlinesMethod · 0.64
test_optional_crMethod · 0.64
test_copyMethod · 0.64