private <T> CompletableFuture<T> handleAsyncResponse(ClientConfiguration clientConfiguration,
                                                         HttpResponse asyncResponse,
                                                         boolean buffered,
                                                         ResultExtractor<T> extractor) {
        if (buffered) {
            // Request + Response fully buffered in memory. Future signalled after the entire response
            // received and processed.
            final CompletableFuture<AggregatedHttpResponse> responseFuture = asyncResponse.aggregate();
            return responseFuture.thenApply(aggregatedResponse -> {
                final HttpData responseContent = aggregatedResponse.content();
                final ClientResponse response = new ResteasyClientResponseImpl(clientConfiguration,
                                                                               aggregatedResponse.headers(),
                                                                               responseContent.toInputStream());
                return extractor.extractResult(response);
            });
        } else {
            // Unbuffered: Future returns immediately after headers. Reading the response-stream blocks,
            // but one may check InputStream#available() to prevent blocking.
            final HttpMessageStream messageStream =
                    readTimeout == null ? HttpMessageStream.of(asyncResponse)
                                        : HttpMessageStream.of(asyncResponse, readTimeout);
            return messageStream.awaitHeaders()
                                .thenApply(asyncResponseHeaders -> {
                                    final ClientResponse response =
                                            new ResteasyClientResponseImpl(clientConfiguration,
                                                                           asyncResponseHeaders,
                                                                           messageStream.content());
                                    return extractor.extractResult(response);
                                });
        }
    }
Armeria does not allow to access the HostnameVerifier from WebClient API.
This functionality must be achieved by configuring {@link com.linecorp.armeria.client.WebClientBuilder}.
@throws UnsupportedOperationException always
resteasy/src/main/java/com/linecorp/armeria/client/resteasy/ArmeriaJaxrsClientEngine.java