def text(self, encoding: Optional[str] = None) -> str:
        """Return the whole body as a string.

        .. seealso:: ~body()

        :param str encoding: The encoding to apply. If None, use "utf-8" with BOM parsing (utf-8-sig).
         Implementation can be smarter if they want (using headers or chardet).
        :rtype: str
        :return: The whole body as a string.
        """
        if encoding == "utf-8" or encoding is None:
            encoding = "utf-8-sig"
        return self.body().decode(encoding)
Return the whole body as a string.

        .. seealso:: ~body()

        :param str encoding: The encoding to apply. If None, use "utf-8" with BOM parsing (utf-8-sig).
         Implementation can be smarter if they want (using headers or chardet).
        :rtype: str
        :return: The whole body as a string.
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/pipeline/transport/_base.py