rschmitt commented on code in PR #782:
URL:
https://github.com/apache/httpcomponents-client/pull/782#discussion_r2692277865
##########
httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Async.java:
##########
@@ -122,4 +231,112 @@ public Future<Content> execute(final Request request) {
return execute(request, new ContentResponseHandler(), null);
}
+ /**
+ * Executes the given request asynchronously and returns a {@link
CompletableFuture} that completes
+ * when the response has been fully received and converted by the given
response handler.
+ *
+ * @param request the request to execute.
+ * @param handler the response handler.
+ * @param <T> the handler result type.
+ * @return a {@code CompletableFuture} producing the handler result.
+ *
+ * @since 5.7
+ */
+ public <T> CompletableFuture<T> executeAsync(final Request request, final
HttpClientResponseHandler<T> handler) {
Review Comment:
Well, I think it's weird to add `CompletableFuture` to this API before we've
added it to the API of the async client.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]