To run each example use: java --enable-preview --source 26 <FileName.java>
- 504 - Remove the Applet API
- 517 - HTTP/3 for the HTTP Client API
- 522 - G1 GC: Improve Throughput by Reducing Synchronization
- HTTP/3 for the HTTP Client API
- added support for HTTP/3 in the HTTP Client API
- HTTP/3 was standardized in 2022
- setting version in HttpClient builder:
-
var client = HttpClient.newBuilder() .version(HttpClient.Version.HTTP_3) .build();
-
- setting version in HttpRequest builder:
-
var request = HttpRequest.newBuilder(URI.create("https://example.com")) .version(HttpClient.Version.HTTP_3) .GET() .build();
-