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


##########
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?
   
   @rschmitt `Fluent` is a wrapper around the classic HttpClient with 
simplified APIs for most common use cases. `Async` in `Fluent` is indeed just a 
wrapper around multi-threaded executor and synchronous request execution.
   
   This is historic and goes back to the early days of HttpClient 4.x



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