Interface HttpOption<T>

Type Parameters:
T - The type of the option value

public sealed interface HttpOption<T>
This interface is used to provide additional request configuration option hints on how an HTTP request/response exchange should be carried out by the HttpClient implementation. Request configuration option hints can be provided to an HttpRequest with the HttpRequest.Builder setOption method.

Concrete instances of this class and its subclasses are immutable.

API Note:
In this version, the HttpOption interface is sealed and only allows the H3_DISCOVERY option. However, it could be extended in the future to support additional options.

The H3_DISCOVERY option can be used to help the HttpClient decide how to select or establish an HTTP/3 connection through which to carry out an HTTP/3 request/response exchange.

Since:
26
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    This enumeration can be used to help the HttpClient decide how an HTTP/3 exchange should be established, and can be provided as the value of the H3_DISCOVERY option to Builder.setOption.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    An option that can be used to configure how the HttpClient will select or establish an HTTP/3 connection through which to carry out the request.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the option name.
    Returns the type of the value associated with the option.