hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shih-liang, Chang" <atkinsch...@icloud.com>
Subject Custom httpclient configuration
Date Sun, 21 Sep 2014 11:04:56 GMT
Hi

I'm using the HttpClient 4.4. 
I am creating HttpClient instance using custom settings. Is the following configuration the
same effect? or whats the different between them? I can’t find it in javadoc.
A.
SocketConfig socketConfig = SocketConfig.custom()
    .setSoTimeout(DEFAULT_SOCKET_TIMEOUT)
    .build();
CloseableHttpClient httpClient = HttpClients.custom()
     .setDefaultSocketConfig(socketConfig)
     .build();


B.


RequestConfig requestConfig = RequestConfig.custom()
    .setSocketTimeout(DEFAULT_SOCKET_TIMEOUT)
    .build();
CloseableHttpClient httpClient = HttpClients.custom()
     .setDefaultRequestConfig(requestConfig)
     .build();


Thanks in advance.
BR,
Atkins
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message