Return a new QueryParams instance, setting the value of a key. Usage: q = httpx.QueryParams("a=123") q = q.set("a", "456") assert q == httpx.QueryParams("a=456")
(self, key: str, value: typing.Any = None)
| 535 | return list(self._dict.get(str(key), [])) |
| 536 | |
| 537 | def set(self, key: str, value: typing.Any = None) -> QueryParams: |
| 538 | class="st">""" |
| 539 | Return a new QueryParams instance, setting the value of a key. |
| 540 | |
| 541 | Usage: |
| 542 | |
| 543 | q = httpx.QueryParams(class="st">"a=123") |
| 544 | q = q.set(class="st">"a", class="st">"456") |
| 545 | assert q == httpx.QueryParams(class="st">"a=456") |
| 546 | class="st">""" |
| 547 | q = QueryParams() |
| 548 | q._dict = dict(self._dict) |
| 549 | q._dict[str(key)] = [primitive_value_to_str(value)] |
| 550 | return q |
| 551 | |
| 552 | def add(self, key: str, value: typing.Any = None) -> QueryParams: |
| 553 | class="st">""" |