diff --git a/src/risotto/http.py b/src/risotto/http.py index b7162c8..aba434c 100644 --- a/src/risotto/http.py +++ b/src/risotto/http.py @@ -58,7 +58,8 @@ class extra_route_handler: raise HTTPInternalServerError(reason=str(err)) # await log.info_msg(kwargs['risotto_context'], # dict(request.match_info)) - return Response(text=dumps(returns)) + return Response(text=dumps(returns), + content_type='application/json') async def handle(request): @@ -84,7 +85,8 @@ async def handle(request): if get_config()['global']['debug']: print_exc() raise HTTPInternalServerError(reason=str(err)) - return Response(text=dumps({'response': text})) + return Response(text=dumps({'response': text}, + content_type='application/json')) async def api(request, risotto_context):