
Java 26 - part 4: JEP 517 HTTP/3 is Finally Here (Natively)!
If you’ve been waiting for Java to catch up with the modern web, the wait is over. Java 26 updates the java.net.http.HttpClient (the one we’ve loved since JDK 11) to officially support HTTP/3. Here is an example of how to use the API 1 2 3 4 5 6 7 var client = HttpClient.newHttpClient(); var request = HttpRequest.newBuilder(URI.create("https://openjdk.org/")) .GET() .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); assert response.statusCode() == 200; String htmlText = response.body(); Why should you care? HTTP/3 isn’t just a version bump; it swaps out TCP for QUIC (built on UDP). This is a big deal for performance because it solves “head-of-line blocking”—where one lost packet holds up the entire line of data. It basically means faster handshakes and much more reliable connections, especially if your users are on flaky networks with high packet loss. ...