Esempio 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'})
Esempio 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'})
Esempio 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'})
Esempio 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"}
     )
Esempio 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"})
Esempio 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"})
Esempio n. 7
0
 async def response_object(self, request: web.Request) -> Response:
     return Response(body='{"data": true}',
                     status=200,
                     content_type='application/json')