if(httpEndpoint == null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Initializing a new HttpEndpoint ...");
}
CamelContext context = exchange.getContext();
HttpComponent httpComponent = context.getComponent("http4", HttpComponent.class);
// set the HttpClientConfigurer to override the default HTTP4 values.
E3HttpClientConfigurer httpClientConfigurer = new E3HttpClientConfigurer();
adpatConnectionPoolSettings(httpClientConfigurer);
httpComponent.setHttpClientConfigurer(httpClientConfigurer);
String endpointParameters = "http4://host?throwExceptionOnFailure=false&httpClient.handleRedirects=false";
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Init the HttPEndPoint for API {} is initialized with [{}]", apiId, endpointParameters);
}
// create endpoint
httpEndpoint = (HttpEndpoint) httpComponent.createEndpoint(endpointParameters);
// This is a WorkArround to removed the parameters from the target URI (a better solution have to be found)
httpEndpoint.setHttpUri(new URI("http4://host"));
} else {