Skip to content

Commit

Permalink
fix: classCastException for RedirectStategy in messageService
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Apr 3, 2024
1 parent 7c94cc5 commit 7ed222b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import java.time.LocalDateTime;
import lombok.extern.slf4j.Slf4j;
import org.apache.hc.client5.http.classic.HttpClient;
import org.apache.hc.client5.http.impl.DefaultRedirectStrategy;
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
import org.apache.hc.client5.http.protocol.RedirectStrategy;
import org.apache.http.impl.client.LaxRedirectStrategy;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -51,9 +50,7 @@ public MessageControllerApi getMessageControllerApi() {
final HttpComponentsClientHttpRequestFactory factory =
new HttpComponentsClientHttpRequestFactory();
final HttpClient httpClient =
HttpClientBuilder.create()
.setRedirectStrategy((RedirectStrategy) new LaxRedirectStrategy())
.build();
HttpClientBuilder.create().setRedirectStrategy(new DefaultRedirectStrategy()).build();
factory.setHttpClient(httpClient);
restTemplate.setRequestFactory(factory);
de.caritas.cob.videoservice.messageservice.generated.ApiClient apiClient =
Expand Down

0 comments on commit 7ed222b

Please sign in to comment.