MCPcopy
hub / github.com/encode/httpx / get

Method get

httpx/_models.py:242–250  ·  httpx/_models.py::Headers.get

Return a header value. If multiple occurrences of the header occur then concatenate them together with commas.

(self, key: str, default: typing.Any = None)

Source from the content-addressed store, hash-verified

240 ]
241
242 def get(self, key: str, default: typing.Any = None) -> typing.Any:
243 class="st">"""
244 Return a header value. If multiple occurrences of the header occur
245 then concatenate them together with commas.
246 class="st">"""
247 try:
248 return self[key]
249 except KeyError:
250 return default
251
252 def get_list(self, key: str, split_commas: bool = False) -> list[str]:
253 class="st">"""

Callers 5

test_headersFunction · 0.95
__init__Method · 0.45
charset_encodingMethod · 0.45
raise_for_statusMethod · 0.45
linksMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_headersFunction · 0.76