Beispiel #1
0
 async def finalize_response(self, response):
     if isinstance(response, self.response_class):
         pass
     elif isinstance(response, self.exception_class):
         return response.get_response()
     elif isinstance(response, six.string_types):
         return HtmlResponse(response)
     elif check_serialize(response):
         return JsonResponse(response)
     else:
         raise Exception("Response Object Type invalid!")
     return response
Beispiel #2
0
Datei: app.py Projekt: dwpy/alita
 async def _(self, json_value):
     return JsonResponse(json_value)