Performance improvements to response and moved tests around
This commit is contained in:
13
tests/performance/aiohttp/python.aiohttp.py
Normal file
13
tests/performance/aiohttp/python.aiohttp.py
Normal 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)
|
||||
Reference in New Issue
Block a user