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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user