arturobernalg commented on code in PR #782:
URL: 
https://github.com/apache/httpcomponents-client/pull/782#discussion_r2692078300


##########
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:
   > Wait, I'm confused. This class provides an async API for synchronous 
request execution?
   
   Fluent is built on the classic client. The new CompletableFuture methods are 
just adapters over the existing callback-based API.



-- 
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]

Reply via email to