Esempio n. 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)
Esempio n. 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))
Esempio n. 3
0
 def text(self) -> str:
     """Gets the request data as str."""
     return to_str(self.data)
Esempio n. 4
0
 def text(self) -> str:
     """Gets content as str."""
     return to_str(self._data)
Esempio n. 5
0
 def json(self) -> Dict[str, object]:
     """Gets content as deserialized JSON dictionary."""
     return json.loads(to_str(self._value))
Esempio n. 6
0
 def text(self) -> str:
     """Gets value as str."""
     return to_str(self._value)