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

Method remove

httpx/_urls.py:567–580  ·  httpx/_urls.py::QueryParams.remove

Return a new QueryParams instance, removing the value of a key. Usage: q = httpx.QueryParams("a=123") q = q.remove("a") assert q == httpx.QueryParams("")

(self, key: str)

Source from the content-addressed store, hash-verified

565 return q
566
567 def remove(self, key: str) -> QueryParams:
568 class="st">"""
569 Return a new QueryParams instance, removing the value of a key.
570
571 Usage:
572
573 q = httpx.QueryParams(class="st">"a=123")
574 q = q.remove(class="st">"a")
575 assert q == httpx.QueryParams(class="st">"")
576 class="st">"""
577 q = QueryParams()
578 q._dict = dict(self._dict)
579 q._dict.pop(str(key), None)
580 return q
581
582 def merge(self, params: QueryParamTypes | None = None) -> QueryParams:
583 class="st">"""

Callers 2

test_queryparam_removeFunction · 0.95
copy_remove_paramMethod · 0.80

Calls 1

QueryParamsClass · 0.85

Tested by 1

test_queryparam_removeFunction · 0.76