Class RESTEndpoint.RESTResponse

  • Enclosing class:
    RESTEndpoint

    public static class RESTEndpoint.RESTResponse
    extends Object
    Class to encapsulate the response from REST API.
    • Constructor Detail

      • RESTResponse

        public RESTResponse()
    • Method Detail

      • getContent

        public List<String> getContent()
        Returns:
        All the text returned by the endpoint, as a list of lines
      • setContent

        public void setContent​(List<String> content)
        Set the content, as a list of lines, returned by the endpoint
        Parameters:
        content - The content, as a list of lines
      • getResponseCode

        public int getResponseCode()
        Returns:
        the response code of the endpoint
      • setResponseCode

        public void setResponseCode​(int responseCode)
        set the response code of the endpoint
        Parameters:
        responseCode - the response code to set
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        A string representation of the endpoint's response