Class HttpRequestOptions.Builder

java.lang.Object
com.luciad.net.http.HttpRequestOptions.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
HttpRequestOptions

public static final class HttpRequestOptions.Builder extends Object implements AutoCloseable
Builder for the HttpRequestOptions class.

Instances of HttpRequestOptions.Builder are created by calling HttpRequestOptions#newBuilder.

Since:
2023.0
  • Constructor Details Link icon

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

      @NotNull public HttpRequestOptions build()
      Returns an HttpRequestOptions, based on the properties set on this builder.
      Returns:
      an HttpRequestOptions, based on the properties set on this builder.
    • header Link icon

      @NotNull public HttpRequestOptions.Builder header(@NotNull String name, @NotNull String value)
      Sets the given name value pair to the set of headers for this options.
      Parameters:
      name - header name
      value - header value
      Returns:
      this builder.
    • header Link icon

      @NotNull public HttpRequestOptions.Builder header(@NotNull HttpHeader header)
      Sets the given http header to the set of headers for this options.
      Parameters:
      header - an HttpHeader.
      Returns:
      this builder.
    • queryParameter Link icon

      @NotNull public HttpRequestOptions.Builder queryParameter(@NotNull String name, @NotNull String value)
      Sets the given name value pair to the set of query parameters for this options.
      Parameters:
      name - query parameter name.
      value - query parameter value.
      Returns:
      this builder.
    • queryParameter Link icon

      @NotNull public HttpRequestOptions.Builder queryParameter(@NotNull UriQueryParameter queryParameter)
      Sets the given query parameter to the set of query parameters for this options.
      Parameters:
      queryParameter - an UriQueryParameter.
      Returns:
      this builder.