Class HttpResponse

java.lang.Object
com.luciad.net.http.HttpResponse
All Implemented Interfaces:
AutoCloseable

public final class HttpResponse extends Object implements AutoCloseable
An HTTP response.

An HttpResponse instance is built through an HttpResponse.Builder.

This class provides methods for accessing the response status code, headers and the response body.

Since:
2023.0
  • Constructor Details Link icon

    • HttpResponse Link icon

      public HttpResponse(@NotNull HttpResponse other)
  • Method Details Link icon

    • finalize Link icon

      protected void finalize()
      Overrides:
      finalize in class Object
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • newBuilder Link icon

      @NotNull public static HttpResponse.Builder newBuilder()
      Returns the new HttpResponse builder.
      Returns:
      the new HttpResponse builder.
    • getBody Link icon

      @Nullable public DataEntity getBody()
      Returns the body of this response.
      Returns:
      the body of this response.
    • getHeaders Link icon

      @NotNull public List<@NotNull HttpHeader> getHeaders()
      Returns the received response headers.
      Returns:
      the received response headers.
    • getStatusCode Link icon

      public int getStatusCode()
      Returns the status code for this response.
      Returns:
      the status code for this response.