I saw that in JDK9 (https://docs.oracle.com/javase/9/docs/api/jdk/incubator/http/HttpResponse.html#trailers--), there was a support for trailers but no longer on JDK 10(https://docs.oracle.com/javase/10/docs/api/jdk/incubator/http/HttpResponse.html) I am currently using JDK11 and when I try my request:
HttpRequest request = HttpRequest.newBuilder()
.uri(uri)
.GET()
.build();
HttpResponse<String> response = httpClient.send(request, BodyHandlers.ofString());
I face a java.util.concurrent.ExecutionException: java.io.IOException: no statuscode in response. It only fails when I am requesting a page with trailer headers.
Any help welcome. Thanks