MCPcopy
hub / github.com/aio-libs/aiohttp / text

Method text

aiohttp/web_reqrep.py:320–324  ·  view source on GitHub ↗

Return BODY as text using encoding from .charset.

(self)

Source from the content-addressed store, hash-verified

318
319 @asyncio.coroutine
320 def text(self):
321 """Return BODY as text using encoding from .charset."""
322 bytes_body = yield from self.read()
323 encoding = self.charset or 'utf-8'
324 return bytes_body.decode(encoding)
325
326 @asyncio.coroutine
327 def json(self, *, loads=json.loads, loader=None):

Callers 15

jsonMethod · 0.95
do_bombFunction · 0.45
test_textMethod · 0.45
test_text_after_readMethod · 0.45
test_client_sslFunction · 0.45
test_wait_forFunction · 0.45
test_middleware_chainFunction · 0.45
goMethod · 0.45

Calls 2

readMethod · 0.95
decodeMethod · 0.80

Tested by 12

test_textMethod · 0.36
test_text_after_readMethod · 0.36
test_client_sslFunction · 0.36
test_wait_forFunction · 0.36
test_middleware_chainFunction · 0.36
goMethod · 0.36
handlerMethod · 0.36
goMethod · 0.36