I am not able to get the most simple example from the documentation to work:
from sanic.response import text
@app.route('/tag/<tag')
async def tag_handler(request, tag):
return text('Tag - {}'.format(tag))
There are several other examples below specifying the type of the parameter as well. (Several of the handlers have the same name number_handler
which is probably a cut and paste error. None of these work either.
I use Postman to send http://ip:port/tag?tag=something
I receive 404: Requested URL not found.
This seems pretty straight forward. Hopefully I’m not just doing something wrong.
Help?