Exemplo n.º 1
0
 async def test_charset_invalid(self, request: web.Request) -> Response:
     return Response(body='test',
                     status=200,
                     headers={'Content-Type': 'text/plain; charset=utf-9'})
Exemplo n.º 2
0
 async def test_response_object(self, request: web.Request) -> Response:
     return Response(body='test tomodachi response',
                     status=200,
                     headers={'X-Tomodachi-Response': 'test'})
Exemplo n.º 3
0
 async def test_charset_encoding_error(self,
                                       request: web.Request) -> Response:
     return Response(
         body='test 友達',
         status=200,
         headers={'Content-Type': 'text/plain; charset=iso-8859-1'})
Exemplo n.º 4
0
 async def test_charset_encoding_correct(self, request: web.Request) -> Response:
     return Response(
         body="test \xe5\xe4\xf6", status=200, headers={"Content-Type": "text/plain; charset=iso-8859-1"}
     )
Exemplo n.º 5
0
 async def test_response_object(self, request: web.Request) -> Response:
     return Response(body="test tomodachi response", status=200, headers={"X-Tomodachi-Response": "test"})
Exemplo n.º 6
0
 async def test_charset_invalid(self, request: web.Request) -> Response:
     return Response(body="test", status=200, headers={"Content-Type": "text/plain; charset=utf-9"})
Exemplo n.º 7
0
 async def response_object(self, request: web.Request) -> Response:
     return Response(body='{"data": true}',
                     status=200,
                     content_type='application/json')