MCPcopy
hub / github.com/scrapy/scrapy / normkey

Method normkey

scrapy/http/headers.py:43–45  ·  view source on GitHub ↗

Normalize key to bytes

(self, key: AnyStr)

Source from the content-addressed store, hash-verified

41 super().update(iseq)
42
43 def normkey(self, key: AnyStr) -> bytes: # type: ignore[override]
44 """Normalize key to bytes"""
45 return self._tobytes(key.title())
46
47 def normvalue(self, value: _RawValue | Iterable[_RawValue]) -> list[bytes]:
48 """Normalize values to bytes"""

Callers 2

updateMethod · 0.95
_get_request_headersMethod · 0.45

Calls 1

_tobytesMethod · 0.95

Tested by

no test coverage detected