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

Method text

aiohttp/web_response.py:753–759  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

751
752 @property
753 def text(self) -> str | None:
754 if self._body is None:
755 return None
756 # Note: When _body is a Payload (e.g. FilePayload), this may do blocking I/O
757 # This is generally safe as most common payloads (BytesPayload, StringPayload)
758 # don't do blocking I/O, but be careful with file-based payloads
759 return self._body.decode(self.charset or "utf-8")
760
761 @text.setter
762 def text(self, text: str) -> None:

Callers 15

test_encoding_deflateFunction · 0.95
test_encoding_gzipFunction · 0.95
test_chunkedFunction · 0.95
test_respMethod · 0.45
test_digest_auth_no_qopFunction · 0.45

Calls 2

encodeMethod · 0.80
decodeMethod · 0.45

Tested by 15

test_encoding_deflateFunction · 0.76
test_encoding_gzipFunction · 0.76
test_chunkedFunction · 0.76
test_respMethod · 0.36
test_digest_auth_no_qopFunction · 0.36