You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/08/02 12:29:00 UTC

[jira] [Updated] (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:all-tabpanel ]

Claus Ibsen updated CAMEL-18093:
--------------------------------
    Fix Version/s: 3.19.0
                       (was: 3.x)

> 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.19.0
>
>
> 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)