Performance improvements to response and moved tests around

This commit is contained in:
Channel Cat
2016-10-08 15:21:40 -07:00
parent 74b0cbae1b
commit 6041e7cfa6
7 changed files with 143 additions and 113 deletions

View File

@@ -0,0 +1,13 @@
from aiohttp import web
async def handle(request):
name = request.match_info.get('name', "Anonymous")
text = "Hello, " + name
return web.Response(text=text)
app = web.Application()
app.router.add_get('/', handle)
app.router.add_get('/{name}', handle)
web.run_app(app)