1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-10 09:35:34 +00:00

CHANGE: return None from json if body is empty

This commit is contained in:
Stanislav Evseev
2018-11-08 18:41:07 +01:00
parent d682e7b19a
commit 7c14d81ab1
3 changed files with 36 additions and 1 deletions

View File

@@ -30,6 +30,14 @@ def aiohttp_app():
async def hello(request):
return aiohttp.web.Response(text='hello')
async def json(request):
return aiohttp.web.json_response({})
async def json_empty_body(request):
return aiohttp.web.json_response()
app = aiohttp.web.Application()
app.router.add_get('/', hello)
app.router.add_get('/json', json)
app.router.add_get('/json/empty', json_empty_body)
return app