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

Method text

aiohttp/client_reqrep.py:734–742  ·  view source on GitHub ↗

Read response payload and decode.

(self, encoding=None)

Source from the content-addressed store, hash-verified

732
733 @asyncio.coroutine
734 def text(self, encoding=None):
735 """Read response payload and decode."""
736 if self._content is None:
737 yield from self.read()
738
739 if encoding is None:
740 encoding = self._get_encoding()
741
742 return self._content.decode(encoding)
743
744 @asyncio.coroutine
745 def json(self, *, encoding=None, loads=json.loads):

Callers

nothing calls this directly

Calls 3

readMethod · 0.95
_get_encodingMethod · 0.95
decodeMethod · 0.80

Tested by

no test coverage detected