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/05/10 15:49:00 UTC
[jira] [Created] (CAMEL-18093) camel-http - Add option to turn on follow redirects
Claus Ibsen created CAMEL-18093:
-----------------------------------
Summary: 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
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.7#820007)