Interface SimpleResponseWrapper

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    DataWranglerResponseImpl, IServerResponseImpl

    public interface SimpleResponseWrapper
    extends java.io.Closeable
    This interface serves as a simplified response object. It hides the external library used.
    • Method Detail

      • getStatusCode

        int getStatusCode()
        Returns:
        response status code
      • getContentType

        java.lang.String getContentType()
        Returns:
        content-type header value
      • getBody

        java.lang.String getBody()
                          throws java.io.IOException
        Returns:
        response body as String
        Throws:
        java.io.IOException
      • getBodyAsStream

        java.io.InputStream getBodyAsStream()
        Returns:
        response body as Stream
      • getHeaders

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
        Returns:
        Response headers
      • setResponse

        void setResponse​(okhttp3.Response response)
                  throws java.io.IOException
        Populate Response parameters
        Parameters:
        response -
        Throws:
        java.io.IOException