diff --git a/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java b/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java index fca40f413..72bcf983c 100644 --- a/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java +++ b/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java @@ -181,7 +181,11 @@ public class Request { } public Response execute() throws IOException { - return new Response(internalExecute(Executor.CLIENT, HttpClientContext.create())); + return execute(Executor.CLIENT); + } + + public Response execute(final CloseableHttpClient client) throws IOException { + return new Response(internalExecute(client, HttpClientContext.create())); } //// HTTP header operations