class QueryParams(typing.Mapping[str, str]):
Method | __bool__ |
Undocumented |
Method | __contains__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __getitem__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setitem__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | add |
Return a new QueryParams instance, setting or appending the value of a key. |
Method | get |
Get a value from the query param for a given key. If the key occurs more than once, then only the first value is returned. |
Method | get_list |
Get all values from the query param for a given key. |
Method | items |
Return all items in the query params. If a key occurs more than once only the first item for that key is returned. |
Method | keys |
Return all the keys in the query params. |
Method | merge |
Return a new QueryParams instance, updated with. |
Method | multi_items |
Return all items in the query params. Allow duplicate keys to occur. |
Method | remove |
Return a new QueryParams instance, removing the value of a key. |
Method | set |
Return a new QueryParams instance, setting the value of a key. |
Method | update |
Undocumented |
Method | values |
Return all the values in the query params. If a key occurs more than once only the first item for that key is returned. |
Instance Variable | _dict |
Undocumented |
Undocumented
Parameters | |
key:typing.Any | Undocumented |
Returns | |
bool | Undocumented |
Undocumented
Parameters | |
*args:QueryParamTypes | Undocumented |
**kwargs:typing.Any | Undocumented |
Return a new QueryParams instance, setting or appending the value of a key.
Usage:
q = httpx.QueryParams("a=123") q = q.add("a", "456") assert q == httpx.QueryParams("a=123&a=456")
Parameters | |
key:str | Undocumented |
value:typing.Any | Undocumented |
Returns | |
QueryParams | Undocumented |
Get a value from the query param for a given key. If the key occurs more than once, then only the first value is returned.
Usage:
q = httpx.QueryParams("a=123&a=456&b=789") assert q.get("a") == "123"
Parameters | |
key:typing.Any | Undocumented |
default:typing.Any | Undocumented |
Returns | |
typing.Any | Undocumented |
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"]
Parameters | |
key:str | Undocumented |
Returns | |
typing.List[ | Undocumented |
Return all items in the query params. If a key occurs more than once only the first item for that key is returned.
Usage:
q = httpx.QueryParams("a=123&a=456&b=789") assert list(q.items()) == [("a", "123"), ("b", "789")]
Returns | |
typing.ItemsView | Undocumented |
Return all the keys in the query params.
Usage:
q = httpx.QueryParams("a=123&a=456&b=789") assert list(q.keys()) == ["a", "b"]
Returns | |
typing.KeysView | Undocumented |
Return a new QueryParams instance, updated with.
Usage:
q = httpx.QueryParams("a=123") q = q.merge({"b": "456"}) assert q == httpx.QueryParams("a=123&b=456")
q = httpx.QueryParams("a=123") q = q.merge({"a": "456", "b": "789"}) assert q == httpx.QueryParams("a=456&b=789")
Parameters | |
params:QueryParamTypes | Undocumented |
Returns | |
QueryParams | Undocumented |
Return all items in the query params. Allow duplicate keys to occur.
Usage:
q = httpx.QueryParams("a=123&a=456&b=789") assert list(q.multi_items()) == [("a", "123"), ("a", "456"), ("b", "789")]
Returns | |
typing.List[ | Undocumented |
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("")
Parameters | |
key:str | Undocumented |
Returns | |
QueryParams | Undocumented |
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")
Parameters | |
key:str | Undocumented |
value:typing.Any | Undocumented |
Returns | |
QueryParams | Undocumented |