You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/08/30 09:52:41 UTC
httpcomponents-client git commit: Overload Request's execute method
to allow custom CloseableHttpClient
Repository: httpcomponents-client
Updated Branches:
refs/heads/master cbe00beb5 -> 6e76a8b38
Overload Request's execute method to allow custom CloseableHttpClient
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/6e76a8b3
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/6e76a8b3
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/6e76a8b3
Branch: refs/heads/master
Commit: 6e76a8b380a3891e5fc002628d1f4d6f6156f35b
Parents: cbe00be
Author: Nicolas Gomez <ni...@imogene.fr>
Authored: Wed Aug 29 10:07:49 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Aug 30 11:49:46 2018 +0200
----------------------------------------------------------------------
.../main/java/org/apache/hc/client5/http/fluent/Request.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/6e76a8b3/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java
----------------------------------------------------------------------
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 fca40f4..72bcf98 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