Class ApiResponse<T>

java.lang.Object
com.binance.connector.client.common.ApiResponse<T>

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

    • 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
    • ApiResponse

      public ApiResponse(int statusCode, Map<String,List<String>> headers, T data, Map<RateLimitType,RateLimit> rateLimits)
      Constructor for ApiResponse.
      Parameters:
      statusCode - The status code of HTTP response
      headers - The headers of HTTP response
      data - The object deserialized from response bod
      rateLimits - The rate limits information
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Get the status code.
      Returns:
      the status code
    • getHeaders

      public Map<String,List<String>> getHeaders()
      Get the headers.
      Returns:
      a Map of headers
    • getData

      public T getData()
      Get the data.
      Returns:
      the data
    • getRateLimits

      public Map<RateLimitType,RateLimit> getRateLimits()
      Get the RateLimits
      Returns:
      the rate limits info