MCPcopy
hub / github.com/encode/httpx / text

Method text

httpx/_models.py:642–650  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

640
641 @property
642 def text(self) -> str:
643 if not hasattr(self, "_text"):
644 content = self.content
645 if not content:
646 self._text = ""
647 else:
648 decoder = TextDecoder(encoding=self.encoding or "utf-8")
649 self._text = "".join([decoder.decode(self.content), decoder.flush()])
650 return self._text
651
652 @property
653 def encoding(self) -> str | None:

Callers

nothing calls this directly

Calls 4

decodeMethod · 0.95
flushMethod · 0.95
TextDecoderClass · 0.85
joinMethod · 0.80

Tested by

no test coverage detected