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.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | HttpOption.
This enumeration can be used to help the |
| Modifier and Type | Field and Description |
|---|---|
| public static final HttpOption | H3_DISCOVERY
An option that can be used to configure how the |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Class | Returns: the type of the value associated with the optionReturns the type of the value associated with the option. |
| H3_DISCOVERY | back to summary |
|---|---|
| public static final HttpOption<HttpOption. An option that can be used to configure how the
The name of this option is Implementation Note The JDK built-in implementation of the
In case of redirect, the
In this implementation, HTTP/3 through proxies is not supported.
Unless | |
| name | back to summary |
|---|---|
| public String name() Returns the option name. Implementation Specification Different options must have different names.
| |
| type | back to summary |
|---|---|
| public Class Returns the type of the value associated with the option. API Note Different options may have the same type.
| |
HttpClient decide
how an HTTP/3 exchange should be established, and can be provided
as the value of the HttpOption#H3_DISCOVERY option
to Builder.setOption .
Note that if neither the request preferred
version nor the client preferred
version is HTTP/3, no HTTP/3 exchange will
be established and the Http3DiscoveryMode is ignored.
| Modifier and Type | Field and Description |
|---|---|
| public static final HttpOption. | ALT_SVC
This instructs the |
| public static final HttpOption. | ANY
This instructs the |
| public static final HttpOption. | HTTP_3_URI_ONLY
This instructs the |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static HttpOption. | |
| public static HttpOption. |
| ALT_SVC | back to summary |
|---|---|
| public static final HttpOption. This instructs the
In this mode, requests sent to the origin server will be sent through HTTP/1.1 or HTTP/2
until a | |
| ANY | back to summary |
|---|---|
| public static final HttpOption. This instructs the Implementation Note If the request preferred version is HTTP/3, the
When attempting an HTTP/3 connection in this mode, the | |
| HTTP_3_URI_ONLY | back to summary |
|---|---|
| public static final HttpOption. This instructs the | |
| Http3DiscoveryMode | back to summary |
|---|---|
| private Http3DiscoveryMode() | |
| valueOf | back to summary |
|---|---|
| public static HttpOption. | |
| values | back to summary |
|---|---|
| public static HttpOption. | |