I have HTTP server on aiohttp with python-3.6. How can I return web.Response() through JSON (from a dict)?
async def api_server(request):
res = {"q": "qqq", "a": "aaa"}
return web.Response(res) # <-- as JSON
I have HTTP server on aiohttp with python-3.6. How can I return web.Response() through JSON (from a dict)?
async def api_server(request):
res = {"q": "qqq", "a": "aaa"}
return web.Response(res) # <-- as JSON