MCPcopy
hub / github.com/urllib3/urllib3 / __init__

Method __init__

src/urllib3/_collections.py:240–249  ·  view source on GitHub ↗
(self, headers: ValidHTTPHeaderSource | None = None, **kwargs: str)

Source from the content-addressed store, hash-verified

238 _container: typing.MutableMapping[str, list[str]]
239
240 def __init__(self, headers: ValidHTTPHeaderSource | None = None, **kwargs: str):
241 super().__init__()
242 self._container = {} # 'dict' is insert-ordered
243 if headers is not None:
244 if isinstance(headers, HTTPHeaderDict):
245 self._copy_from(headers)
246 else:
247 self.extend(headers)
248 if kwargs:
249 self.extend(kwargs)
250
251 def __setitem__(self, key: str, val: str) -> None:
252 # avoid a bytes/str comparison by decoding before httplib

Callers 1

__init__Method · 0.45

Calls 2

_copy_fromMethod · 0.95
extendMethod · 0.95

Tested by

no test coverage detected