0

My API server wants the URL to have %3A which I generate using urllib parse quote. However when I pass the URL to aiohtttp it replaces it with ':' . How to avoid this ?

Example : END POINT = http://server/item_url/http%3A//<path_to_item>

when i pass this url to aiohttp session.post(END_POINT, data) my request fails which when i debug found out that http%3A// has become http://

Ram K
  • 1,746
  • 2
  • 14
  • 23
  • 1
    Can you provide a [mcve] that reproduces this behaviour? – Patrick Haugh May 25 '19 at 20:13
  • @PatrickHaugh i have expanded my question – Ram K May 25 '19 at 20:17
  • 1
    `post` can also take the url as a [`yarl.URL`](https://yarl.readthedocs.io/en/stable/api.html#yarl.URL) object. Could you try creating one of those objects and using it as your url? – Patrick Haugh May 25 '19 at 20:25
  • @PatrickHaugh Yes , that's the right solution to the problem . I did more search on this topic and came across : https://github.com/aio-libs/aiohttp/issues/2188 , where they talk about the same problem and the solution. Thanks ! – Ram K May 25 '19 at 20:52

0 Answers0