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 Link icon

    • HttpRequest Link icon

      public HttpRequest(@NotNull HttpRequest 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 HttpRequest.Builder newBuilder()
      Creates a new HttpRequest builder.
      Returns:
      a new HttpRequest builder.
    • asBuilder Link icon

      @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 Link icon

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

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

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

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

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

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