Skip to content

Instantly share code, notes, and snippets.

@dhaval201279
Last active May 18, 2020 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhaval201279/409eedc7edb5e1a770e30aedc85c67fa to your computer and use it in GitHub Desktop.
Save dhaval201279/409eedc7edb5e1a770e30aedc85c67fa to your computer and use it in GitHub Desktop.
Configuring HttpClient using RequestConfig
private RequestConfig prepareHttpClientRequestConfig() {
RequestConfig requestConfig = RequestConfig
.custom()
.setConnectTimeout(CONNECT_TIMEOUT)
.setConnectionRequestTimeout(CONNECTION_REQUEST_TIMEOUT)
.setSocketTimeout(SOCKET_TIMEOUT)
.build();
return requestConfig;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment