Skip to content

Add method to set the default HttpClient#9

Closed
paivaric wants to merge 1 commit intoKong:masterfrom
focusnetworks:master
Closed

Add method to set the default HttpClient#9
paivaric wants to merge 1 commit intoKong:masterfrom
focusnetworks:master

Conversation

@paivaric
Copy link

This is usefull to create Pooling Clients like:

PoolingClientConnectionManager conMan = new PoolingClientConnectionManager(SchemeRegistryFactory.createDefault());
conMan.setMaxTotal(200);
conMan.setDefaultMaxPerRoute(200);
HttpClient client = new DefaultHttpClient(conMan);
ClientFactory.setHttpClient(client);

@subnetmarco
Copy link
Member

With commit 009bb77 this can be done using the following methods:

Unirest.setHttpClient(httpClient);
Unirest.setAsyncHttpClient(asyncHttpClient);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants