Replies: 1 comment
-
: is safe in a query, so there's no need to quote it. It's explicitly listed at https://github.com/aio-libs/yarl/blob/110038ac28f521e0b9c7a0615fe9b44b1b5e9deb/yarl/_quoters.py#L12 If you want to force a specific encoding of your URL, then you probably just want to pass a pre-encoded URL. See the note under: https://docs.aiohttp.org/en/stable/client_quickstart.html#passing-parameters-in-urls |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! For working with the API, I use the URN in the parameters. Here's an example of the data and URL:
If i understand, the colon : should be converted to %3A, but when using aiohttp, I encounter an issue where this conversion doesn't happen. As a result, the final URL incorrect. Meanwhile, requests correctly converted colons.
Aiohttp:
https://api.example.com?param=urn:ex:abc:12345
requests:
https://api.example.com?param=urn%3Aex%3Aabc%3A12345
I also tried using parameters with %3A directly. But in this case, aiohttp behaves the same way as requests, and it translates %3A into %253A.
https://api.example.com?param=urn%253Aex%253Aabc%253A12345
So, how can I send the request using aiohttp with correct url?
I use 3.11.11 aiohttp version
Beta Was this translation helpful? Give feedback.
All reactions