[
https://issues.apache.org/jira/browse/CAMEL-18093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561953#comment-17561953
]
Rhuan Rocha commented on CAMEL-18093:
-------------------------------------
Hi [~davsclaus],
I`m working on camel-http, but I have noted you provided an example using rest.
I`ll apply to both components, okay?
> camel-http - Add option to turn on follow redirects
> ---------------------------------------------------
>
> Key: CAMEL-18093
> URL: https://issues.apache.org/jira/browse/CAMEL-18093
> Project: Camel
> Issue Type: New Feature
> Components: camel-http
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 3.x
>
>
> With your hint, I have found the solution: httpClientConfigure
> from("direct:start")
>
> .to("rest:POST:users/{id}/basic?throwExceptionOnFailure=false&httpClientConfigurer=#customConfigurer")
> .log(LoggingLevel.INFO, "Received body : ${body}")
> .to("mock:result");
> @BindToRegistry("customConfigurer")
> private TestClientConfigurer testConfigurer;
> private static class TestClientConfigurer implements HttpClientConfigurer {
> @Override public void configureHttpClient(HttpClientBuilder
> clientBuilder) {
> clientBuilder.setRedirectStrategy(new LaxRedirectStrategy()); }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)