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