Skip to content

Commit

Permalink
[bug]FollowRedirects was not set in http request config in resttempla…
Browse files Browse the repository at this point in the history
…te starter
  • Loading branch information
A.Alimohammadi authored and A.Alimohammadi committed Oct 7, 2023
1 parent f97d827 commit 6699c47
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ public HttpClientBuilder createBuilder() {

private void configureTimeouts(HttpClientBuilder builder) {
builder.setDefaultRequestConfig(RequestConfig.custom()
.setConnectTimeout(httpClientProperties.getConnection().getConnectionTimeout(), TimeUnit.MILLISECONDS)
.setConnectionRequestTimeout(httpClientProperties.getConnection().getSocketTimeout(), TimeUnit.MILLISECONDS)
.build());
.setConnectTimeout(httpClientProperties.getConnection().getConnectionTimeout(), TimeUnit.MILLISECONDS)
.setConnectionRequestTimeout(httpClientProperties.getConnection().getSocketTimeout(), TimeUnit.MILLISECONDS)
.setRedirectsEnabled(httpClientProperties.getConnection().isFollowRedirects())
.build());
}

private void configureConnectionManager(HttpClientBuilder builder) {
Expand Down

0 comments on commit 6699c47

Please sign in to comment.