You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rhuan Rocha (Jira)" <ji...@apache.org> on 2022/07/01 21:51:00 UTC
[jira] [Commented] (CAMEL-18093) camel-http - Add option to turn on follow redirects
[ https://issues.apache.org/jira/browse/CAMEL-18093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561628#comment-17561628 ]
Rhuan Rocha commented on CAMEL-18093:
-------------------------------------
Hi [~davsclaus],
I will get this issue to contribute, 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)