Class HttpRequest

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

public final class HttpRequest extends Object implements AutoCloseable
An HTTP request.

An HttpRequest instance is built through an HttpRequest.Builder.

Since:
2023.0
  • Constructor Details

    • HttpRequest

      public HttpRequest(@NotNull HttpRequest other)
  • Method Details

    • finalize

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

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

      @NotNull public static HttpRequest.Builder newBuilder()
      Creates a new HttpRequest builder.
      Returns:
      a new HttpRequest builder.
    • asBuilder

      @NotNull public HttpRequest.Builder asBuilder()
      Returns an HttpRequest builder that has all properties of this HttpRequest.
      Returns:
      an HttpRequest builder that has all properties of this HttpRequest.
    • getUri

      @NotNull public String getUri()
      Returns the request's URI.
      Returns:
      the request's URI.
    • getBaseUri

      @NotNull public String getBaseUri()
      Returns the request's URI without the query string.
      Returns:
      the request's URI without the query string.
    • getMethod

      @NotNull public HttpRequestMethod getMethod()
      Returns the request method for this request.
      Returns:
      the request method for this request.
    • getHeaders

      @NotNull public List<@NotNull HttpHeader> getHeaders()
      Returns the request headers for this request.
      Returns:
      the request headers for this request.
    • getQueryParameters

      @NotNull public List<@NotNull UriQueryParameter> getQueryParameters()
      Returns the query parameters for this request.
      Returns:
      the query parameters for this request.
    • getBody

      @Nullable public DataEntity getBody()
      Returns the body for this http request, if any.
      Returns:
      the body for this http request, if any.