问题描述:

I am creating a telegram bot that gets an updates via webhook.

So, i am successfully registered the webhook with url looks like:

https://my-app.herokuapp.com/123456789:aglbfiwefiuwehwelf # url with fake token

And then i added a route to handle an update:

app.router.add_route('POST', '/123456789:aglbfiwefiuwehwelf', webhook)

The bot hosted on heroku and when i run it, i see a 404 error in a heroku log. I tested it locally and i found out that aiohttp not resolves the url with colon. I solved this problem by using a variable

app.router.add_route('POST', '/{token}', webhook), but i am interested in why actually aiohttp not allows a colon in url path?

相关阅读:
Top