Interface HttpResponse<T>

Type Parameters:
T - type of object that the response body is converted to

public interface HttpResponse<T>
Represents an HTTP request execution response.
  • Method Details

    • getHttpStatusCode

      int getHttpStatusCode()
      Retrieves the HTTP status code.
      Returns:
      HTTP status code, for example, 200
    • getHeaderNames

      List<String> getHeaderNames()
      Retrieves a list of HTTP response header names.
      Returns:
      non-null List of header names
    • getHeaderValues

      List<String> getHeaderValues(String name)
      Retrieves a list of HTTP response header values for the given header name.
      Parameters:
      name - name of header to get values for. Cannot be null or empty.
      Returns:
      non-null list of header values
    • getResponseBody

      T getResponseBody()
      Retrieves the HTTP response body.
      Returns:
      HTTP response body, or null if no response body is present