Overload Request's execute method to allow custom CloseableHttpClient

This commit is contained in:
Nicolas Gomez 2018-08-29 10:07:49 +02:00 committed by Oleg Kalnichevski
parent cbe00beb56
commit 6e76a8b380
1 changed files with 5 additions and 1 deletions

View File

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