Пример #1
0
    def text(self) -> str:
        """Gets content as str if the response data content is not serialized
        protocol buffer message.

        Raises:
            ValueError: the response data is the serialized protocol buffer message
        """
        return to_str(self.data)
Пример #2
0
    def json(self) -> Dict[str, object]:
        """Gets the content as json if the response data content is not a serialized
        protocol buffer message.

        Returns:
            str: [description]
        """
        return json.loads(to_str(self.data))
Пример #3
0
 def text(self) -> str:
     """Gets the request data as str."""
     return to_str(self.data)
Пример #4
0
 def text(self) -> str:
     """Gets content as str."""
     return to_str(self._data)
Пример #5
0
 def json(self) -> Dict[str, object]:
     """Gets content as deserialized JSON dictionary."""
     return json.loads(to_str(self._value))
Пример #6
0
 def text(self) -> str:
     """Gets value as str."""
     return to_str(self._value)