Class StringResponse


  • public class StringResponse
    extends Response
    A StringResponse object represents an HTTP response with a string payload.
    • Constructor Detail

      • StringResponse

        public StringResponse()
        Constructs a new StringResponse object.
      • StringResponse

        public StringResponse​(String payload)
        Constructs a new StringResponse object.
        Parameters:
        payload - the payload of the response
    • Method Detail

      • getPayload

        public String getPayload()
        Gets the payload of the response.
        Returns:
        the payload of the response
      • setPayload

        public void setPayload​(String playload)
        Sets the payload of the response.
        Parameters:
        playload - the payload of the response
      • fromJson

        public static StringResponse fromJson​(String serialized)
        Converts a serialized JSON response to a StringResponse object.
        Parameters:
        serialized - a JSON object string containing the response
        Returns:
        the deserialized response