Class ApiResponse<T>


  • public class ApiResponse<T>
    extends Object
    API response returned by API call.
    • Constructor Detail

      • ApiResponse

        public ApiResponse​(int statusCode,
                           Map<String,​List<String>> headers)

        Constructor for ApiResponse.

        Parameters:
        statusCode - The status code of HTTP response
        headers - The headers of HTTP response
      • ApiResponse

        public ApiResponse​(int statusCode,
                           Map<String,​List<String>> headers,
                           T data)

        Constructor for ApiResponse.

        Parameters:
        statusCode - The status code of HTTP response
        headers - The headers of HTTP response
        data - The object deserialized from response bod
    • Method Detail

      • getStatusCode

        public int getStatusCode()

        Get the status code.

        Returns:
        the status code
      • getData

        public T getData()

        Get the data.

        Returns:
        the data