Set in params treated differently as List
#2847
Answered
by
karpetrosyan
finswimmer
asked this question in
Potential Issue
-
|
Hey, if one of my params contains a list, httpx.Request('GET', 'http://example.com', params={"a": [1, 2 ,3]}).url
# URL('http://example.com?a=1&a=2&a=3')I would expect this behavior as well, if the parameter contains a set. But instead the set is turned into a string. httpx.Request('GET', 'http://example.com', params={"a": {1, 2 ,3}}).url
# URL('http://example.com?a=%7B1%2C%202%2C%203%7D')Is this a feature or a bug? 😃 I'm using httpx version fin swimmer |
Beta Was this translation helpful? Give feedback.
Answered by
karpetrosyan
Sep 14, 2023
Replies: 1 comment 5 replies
-
Neither, it's Python. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You've used an unsupported type, and you're getting unexpected results. If you use an IDE tool or mypy for Python typing, it should probably warn you that the type you are using is incorrect.
type you have used for params is: typing.Dict[str, set[int]]
Supported types:
Valid examples: