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

Method get_list

httpx/_urls.py:526–535  ·  httpx/_urls.py::QueryParams.get_list

Get all values from the query param for a given key. Usage: q = httpx.QueryParams("a=123&a=456&b=789") assert q.get_list("a") == ["123", "456"]

(self, key: str)

Source from the content-addressed store, hash-verified

524 return default
525
526 def get_list(self, key: str) -> list[str]:
527 class="st">"""
528 Get all values from the query param for a given key.
529
530 Usage:
531
532 q = httpx.QueryParams(class="st">"a=123&a=456&b=789")
533 assert q.get_list(class="st">"a") == [class="st">"123", class="st">"456"]
534 class="st">"""
535 return list(self._dict.get(str(key), []))
536
537 def set(self, key: str, value: typing.Any = None) -> QueryParams:
538 class="st">"""

Callers 2

addMethod · 0.95
test_queryparamsFunction · 0.95

Calls 1

getMethod · 0.45

Tested by 1

test_queryparamsFunction · 0.76