You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/03/17 11:55:29 UTC

[camel] 01/15: CAMEL-18995: camel-http - Upgrade to HttpComponents 5.x

This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-18995/upgrade-httpcomponents-5
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f03ca71e289b0eb2a327b1028affbd65ebc90ee9
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Fri Mar 17 12:23:17 2023 +0100

    CAMEL-18995: camel-http - Upgrade to HttpComponents 5.x
---
 components/camel-http/pom.xml                      |  12 +-
 .../component/http/HttpComponentConfigurer.java    |  36 ++-
 ...verterLoader.java => HttpConvertersLoader.java} |  18 +-
 .../component/http/HttpEndpointConfigurer.java     |  28 +-
 .../component/http/HttpEndpointUriFactory.java     |   6 +-
 .../component/http/HttpEntityConverterLoader.java  |   6 +-
 ...Loader.java => HttpTimeoutConverterLoader.java} |  18 +-
 .../services/org/apache/camel/TypeConverterLoader  |   1 +
 .../org/apache/camel/component/http/http.json      |  27 +-
 .../org/apache/camel/component/http/https.json     |  27 +-
 .../camel-http/src/main/docs/http-component.adoc   |   4 +-
 .../BasicAuthenticationHttpClientConfigurer.java   |  12 +-
 .../component/http/CompositeHttpConfigurer.java    |  12 +-
 .../camel/component/http/HttpClientConfigurer.java |   2 +-
 .../apache/camel/component/http/HttpComponent.java | 223 +++++++++-----
 .../http/HttpComponentVerifierExtension.java       |  95 +++---
 .../apache/camel/component/http/HttpConstants.java |   4 +-
 ...leteWithBodyMethod.java => HttpConverters.java} |  38 ++-
 .../component/http/HttpCredentialsHelper.java      |  13 +-
 .../apache/camel/component/http/HttpEndpoint.java  | 180 ++++++-----
 .../camel/component/http/HttpEntityConverter.java  |  60 ++--
 .../apache/camel/component/http/HttpMethods.java   | 103 +++----
 .../camel/component/http/HttpPollingConsumer.java  |  99 ++++---
 .../apache/camel/component/http/HttpProducer.java  | 330 ++++++++++++---------
 .../org/apache/camel/component/http/HttpUtil.java  |   4 +-
 .../camel/component/http/NoopCookieStore.java      |   4 +-
 .../http/PreemptiveAuthExecChainHandler.java       |  62 ++++
 .../component/http/PreemptiveAuthInterceptor.java  |  51 ----
 .../component/http/ProxyHttpClientConfigurer.java  |  16 +-
 .../apache/camel/component/http/BaseHttpTest.java  |  12 +-
 .../apache/camel/component/http/BaseHttpsTest.java |   9 +-
 .../http/CamelComponentVerifierExtensionTest.java  |  34 +--
 .../component/http/CamelComponentVerifierTest.java |  34 +--
 .../camel/component/http/FollowRedirectTest.java   |  18 +-
 .../camel/component/http/HeaderFilteringTest.java  |   4 +-
 .../component/http/HttpAuthenticationTest.java     |  40 +--
 .../apache/camel/component/http/HttpBodyTest.java  |  18 +-
 ...java => HttpBodyWithOtherProtocolNameTest.java} |   4 +-
 .../component/http/HttpBridgeEndpointTest.java     |  12 +-
 .../http/HttpCamelHeadersNotCopiedTest.java        |   2 +-
 .../camel/component/http/HttpCamelHeadersTest.java |  34 +--
 .../camel/component/http/HttpCharsetTest.java      |  16 +-
 .../camel/component/http/HttpCompressionTest.java  |  80 ++---
 .../camel/component/http/HttpConcurrentTest.java   |  16 +-
 .../component/http/HttpCredentialsHelperTest.java  |  59 ++--
 .../component/http/HttpDefaultPortNumberTest.java  |  26 +-
 .../component/http/HttpDisableStreamCacheTest.java |  10 +-
 .../camel/component/http/HttpEndpointURLTest.java  |   5 +-
 .../http/HttpEndpointUriAssemblerTest.java         |  22 +-
 .../camel/component/http/HttpMethodsTest.java      |  32 +-
 .../component/http/HttpNoCamelHeaderTest.java      |  21 +-
 .../http/HttpNoConnectionRedeliveryTest.java       |  14 +-
 .../camel/component/http/HttpNoConnectionTest.java |  14 +-
 .../apache/camel/component/http/HttpPathTest.java  |  14 +-
 .../component/http/HttpPollingConsumerTest.java    |  14 +-
 .../http/HttpProducerBridgeEndpointTest.java       |  20 +-
 .../http/HttpProducerConnectionCloseTest.java      |  18 +-
 .../http/HttpProducerContentLengthTest.java        |  20 +-
 .../http/HttpProducerContentTypeTest.java          |  20 +-
 .../HttpProducerContentTypeWithSemiColonTest.java  |  20 +-
 .../http/HttpProducerCustomHeaderTest.java         |  22 +-
 .../HttpProducerExplicitConnectionCloseTest.java   |  19 +-
 .../component/http/HttpProducerLoadManualIT.java   |   8 +-
 .../component/http/HttpProducerRestartTest.java    |  22 +-
 .../http/HttpProducerSelectMethodTest.java         |  14 +-
 .../component/http/HttpProducerSessionTest.java    |   2 +-
 .../HttpProducerTwoHeadersWithSameKeyTest.java     |  28 +-
 .../HttpProducerTwoParametersWithSameKeyTest.java  |  21 +-
 .../component/http/HttpProducerUserAgentTest.java  |  20 +-
 .../component/http/HttpProxyAndBasicAuthTest.java  | 106 ++-----
 .../camel/component/http/HttpProxyServerTest.java  |  96 ++----
 .../component/http/HttpQueryParameterTest.java     |  10 +-
 .../apache/camel/component/http/HttpQueryTest.java |  14 +-
 .../camel/component/http/HttpRedirectTest.java     |  71 ++---
 .../component/http/HttpReferenceParameterTest.java |   6 +-
 .../camel/component/http/HttpSOTimeoutTest.java    |  27 +-
 .../http/HttpSendDynamicAwareBasicAuthTest.java    |  30 +-
 .../http/HttpSendDynamicAwareEmptyPathTest.java    |   8 +-
 .../http/HttpSendDynamicAwareHeadersTest.java      |   8 +-
 .../http/HttpSendDynamicAwarePathHeaderTest.java   |   8 +-
 .../http/HttpSendDynamicAwareRawParameterTest.java |   7 +-
 .../http/HttpSendDynamicAwareRawTest.java          |  10 +-
 .../component/http/HttpSendDynamicAwareTest.java   |  10 +-
 .../HttpSendDynamicAwareUriWithSpacesTest.java     |   8 +-
 .../HttpSendDynamicAwareUriWithoutSlashTest.java   |   8 +-
 .../component/http/HttpServerTestSupport.java      |  23 +-
 .../camel/component/http/HttpSetHeaderIdsTest.java |  12 +-
 .../component/http/HttpSquareBracketTest.java      |  10 +-
 .../http/HttpThrowExceptionOnFailureTest.java      |  12 +-
 .../camel/component/http/HttpToDSOTimeoutTest.java |  20 +-
 .../component/http/HttpWithHttpUriHeaderTest.java  |  10 +-
 .../component/http/HttpsAuthenticationTest.java    |  32 +-
 .../apache/camel/component/http/HttpsGetTest.java  |  12 +-
 .../HttpsProducerWithSystemPropertiesTest.java     |  24 +-
 .../http/HttpsSslContextParametersGetTest.java     |  10 +-
 ...psTwoComponentsSslContextParametersGetTest.java |  14 +-
 ...tpsTwoDifferentSslContextParametersGetTest.java |  12 +-
 .../http/ManagedHttpProducerPoolStatsTest.java     |  20 +-
 .../handler/AuthenticationValidationHandler.java   |  14 +-
 .../handler/BasicRawQueryValidationHandler.java    |   7 +-
 .../http/handler/BasicValidationHandler.java       |  49 ++-
 .../http/handler/DelayValidationHandler.java       |  10 +-
 .../http/handler/DrinkAuthValidationHandler.java   |  17 +-
 .../http/handler/DrinkQueryValidationHandler.java  |  10 +-
 .../http/handler/DrinkValidationHandler.java       |   4 +-
 .../http/handler/HeaderValidationHandler.java      |  18 +-
 ...oxyAndBasicAuthenticationValidationHandler.java |  14 +-
 .../ProxyAuthenticationValidationHandler.java      |  14 +-
 .../http/interceptor/BasicAuthTokenExtractor.java  |  56 ++++
 .../http/interceptor/RequestBasicAuth.java}        |  29 +-
 .../http/interceptor/RequestProxyBasicAuth.java    |  71 +++++
 .../ResponseBasicUnauthorized.java}                |  31 +-
 .../ResponseProxyBasicUnauthorized.java}           |  30 +-
 .../http/rest/RestCamelComponentVerifierTest.java  |  22 +-
 114 files changed, 1760 insertions(+), 1583 deletions(-)

diff --git a/components/camel-http/pom.xml b/components/camel-http/pom.xml
index adef0004b6f..3bcef72b2d0 100644
--- a/components/camel-http/pom.xml
+++ b/components/camel-http/pom.xml
@@ -56,9 +56,9 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>${httpclient4-version}</version>
+            <groupId>org.apache.httpcomponents.client5</groupId>
+            <artifactId>httpclient5</artifactId>
+            <version>${httpclient-version}</version>
         </dependency>
 
         <!-- testing -->
@@ -88,9 +88,9 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>${httpclient4-version}</version>
+            <groupId>org.apache.httpcomponents.client5</groupId>
+            <artifactId>httpclient5</artifactId>
+            <version>${httpclient-version}</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>
diff --git a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpComponentConfigurer.java b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpComponentConfigurer.java
index 3caf3f0eed8..58d39840502 100644
--- a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpComponentConfigurer.java
+++ b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpComponentConfigurer.java
@@ -30,11 +30,11 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "autowiredenabled":
         case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
         case "clientconnectionmanager":
-        case "clientConnectionManager": target.setClientConnectionManager(property(camelContext, org.apache.http.conn.HttpClientConnectionManager.class, value)); return true;
+        case "clientConnectionManager": target.setClientConnectionManager(property(camelContext, org.apache.hc.client5.http.io.HttpClientConnectionManager.class, value)); return true;
         case "connecttimeout":
-        case "connectTimeout": target.setConnectTimeout(property(camelContext, int.class, value)); return true;
+        case "connectTimeout": target.setConnectTimeout(property(camelContext, org.apache.hc.core5.util.Timeout.class, value)); return true;
         case "connectionrequesttimeout":
-        case "connectionRequestTimeout": target.setConnectionRequestTimeout(property(camelContext, int.class, value)); return true;
+        case "connectionRequestTimeout": target.setConnectionRequestTimeout(property(camelContext, org.apache.hc.core5.util.Timeout.class, value)); return true;
         case "connectionstatedisabled":
         case "connectionStateDisabled": target.setConnectionStateDisabled(property(camelContext, boolean.class, value)); return true;
         case "connectiontimetolive":
@@ -46,7 +46,7 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "cookiemanagementdisabled":
         case "cookieManagementDisabled": target.setCookieManagementDisabled(property(camelContext, boolean.class, value)); return true;
         case "cookiestore":
-        case "cookieStore": target.setCookieStore(property(camelContext, org.apache.http.client.CookieStore.class, value)); return true;
+        case "cookieStore": target.setCookieStore(property(camelContext, org.apache.hc.client5.http.cookie.CookieStore.class, value)); return true;
         case "copyheaders":
         case "copyHeaders": target.setCopyHeaders(property(camelContext, boolean.class, value)); return true;
         case "defaultuseragentdisabled":
@@ -62,7 +62,7 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "httpconfiguration":
         case "httpConfiguration": target.setHttpConfiguration(property(camelContext, org.apache.camel.http.common.HttpConfiguration.class, value)); return true;
         case "httpcontext":
-        case "httpContext": target.setHttpContext(property(camelContext, org.apache.http.protocol.HttpContext.class, value)); return true;
+        case "httpContext": target.setHttpContext(property(camelContext, org.apache.hc.core5.http.protocol.HttpContext.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "maxtotalconnections":
@@ -87,12 +87,16 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "redirectHandlingDisabled": target.setRedirectHandlingDisabled(property(camelContext, boolean.class, value)); return true;
         case "responsepayloadstreamingthreshold":
         case "responsePayloadStreamingThreshold": target.setResponsePayloadStreamingThreshold(property(camelContext, int.class, value)); return true;
+        case "responsetimeout":
+        case "responseTimeout": target.setResponseTimeout(property(camelContext, org.apache.hc.core5.util.Timeout.class, value)); return true;
         case "skiprequestheaders":
         case "skipRequestHeaders": target.setSkipRequestHeaders(property(camelContext, boolean.class, value)); return true;
         case "skipresponseheaders":
         case "skipResponseHeaders": target.setSkipResponseHeaders(property(camelContext, boolean.class, value)); return true;
+        case "sotimeout":
+        case "soTimeout": target.setSoTimeout(property(camelContext, org.apache.hc.core5.util.Timeout.class, value)); return true;
         case "sockettimeout":
-        case "socketTimeout": target.setSocketTimeout(property(camelContext, int.class, value)); return true;
+        case "socketTimeout": target.setSocketTimeout(property(camelContext, org.apache.hc.core5.util.Timeout.class, value)); return true;
         case "sslcontextparameters":
         case "sslContextParameters": target.setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
         case "useglobalsslcontextparameters":
@@ -115,11 +119,11 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "autowiredenabled":
         case "autowiredEnabled": return boolean.class;
         case "clientconnectionmanager":
-        case "clientConnectionManager": return org.apache.http.conn.HttpClientConnectionManager.class;
+        case "clientConnectionManager": return org.apache.hc.client5.http.io.HttpClientConnectionManager.class;
         case "connecttimeout":
-        case "connectTimeout": return int.class;
+        case "connectTimeout": return org.apache.hc.core5.util.Timeout.class;
         case "connectionrequesttimeout":
-        case "connectionRequestTimeout": return int.class;
+        case "connectionRequestTimeout": return org.apache.hc.core5.util.Timeout.class;
         case "connectionstatedisabled":
         case "connectionStateDisabled": return boolean.class;
         case "connectiontimetolive":
@@ -131,7 +135,7 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "cookiemanagementdisabled":
         case "cookieManagementDisabled": return boolean.class;
         case "cookiestore":
-        case "cookieStore": return org.apache.http.client.CookieStore.class;
+        case "cookieStore": return org.apache.hc.client5.http.cookie.CookieStore.class;
         case "copyheaders":
         case "copyHeaders": return boolean.class;
         case "defaultuseragentdisabled":
@@ -147,7 +151,7 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "httpconfiguration":
         case "httpConfiguration": return org.apache.camel.http.common.HttpConfiguration.class;
         case "httpcontext":
-        case "httpContext": return org.apache.http.protocol.HttpContext.class;
+        case "httpContext": return org.apache.hc.core5.http.protocol.HttpContext.class;
         case "lazystartproducer":
         case "lazyStartProducer": return boolean.class;
         case "maxtotalconnections":
@@ -172,12 +176,16 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "redirectHandlingDisabled": return boolean.class;
         case "responsepayloadstreamingthreshold":
         case "responsePayloadStreamingThreshold": return int.class;
+        case "responsetimeout":
+        case "responseTimeout": return org.apache.hc.core5.util.Timeout.class;
         case "skiprequestheaders":
         case "skipRequestHeaders": return boolean.class;
         case "skipresponseheaders":
         case "skipResponseHeaders": return boolean.class;
+        case "sotimeout":
+        case "soTimeout": return org.apache.hc.core5.util.Timeout.class;
         case "sockettimeout":
-        case "socketTimeout": return int.class;
+        case "socketTimeout": return org.apache.hc.core5.util.Timeout.class;
         case "sslcontextparameters":
         case "sslContextParameters": return org.apache.camel.support.jsse.SSLContextParameters.class;
         case "useglobalsslcontextparameters":
@@ -258,10 +266,14 @@ public class HttpComponentConfigurer extends PropertyConfigurerSupport implement
         case "redirectHandlingDisabled": return target.isRedirectHandlingDisabled();
         case "responsepayloadstreamingthreshold":
         case "responsePayloadStreamingThreshold": return target.getResponsePayloadStreamingThreshold();
+        case "responsetimeout":
+        case "responseTimeout": return target.getResponseTimeout();
         case "skiprequestheaders":
         case "skipRequestHeaders": return target.isSkipRequestHeaders();
         case "skipresponseheaders":
         case "skipResponseHeaders": return target.isSkipResponseHeaders();
+        case "sotimeout":
+        case "soTimeout": return target.getSoTimeout();
         case "sockettimeout":
         case "socketTimeout": return target.getSocketTimeout();
         case "sslcontextparameters":
diff --git a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpConvertersLoader.java
similarity index 67%
copy from components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java
copy to components/camel-http/src/generated/java/org/apache/camel/component/http/HttpConvertersLoader.java
index 2be78b1e51c..7ed444964ea 100644
--- a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java
+++ b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpConvertersLoader.java
@@ -18,11 +18,11 @@ import org.apache.camel.util.DoubleMap;
  */
 @SuppressWarnings("unchecked")
 @DeferredContextBinding
-public final class HttpEntityConverterLoader implements TypeConverterLoader, CamelContextAware {
+public final class HttpConvertersLoader implements TypeConverterLoader, CamelContextAware {
 
     private CamelContext camelContext;
 
-    public HttpEntityConverterLoader() {
+    public HttpConvertersLoader() {
     }
 
     @Override
@@ -41,12 +41,14 @@ public final class HttpEntityConverterLoader implements TypeConverterLoader, Cam
     }
 
     private void registerConverters(TypeConverterRegistry registry) {
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, byte[].class, false,
-            (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((byte[]) value, exchange));
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, java.io.InputStream.class, false,
-            (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((java.io.InputStream) value, exchange));
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, java.lang.String.class, false,
-            (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((java.lang.String) value, exchange));
+        addTypeConverter(registry, org.apache.hc.core5.util.TimeValue.class, java.lang.String.class, false,
+            (type, exchange, value) -> org.apache.camel.component.http.HttpConverters.toTimeValue((java.lang.String) value));
+        addTypeConverter(registry, org.apache.hc.core5.util.TimeValue.class, long.class, false,
+            (type, exchange, value) -> org.apache.camel.component.http.HttpConverters.toTimeValue((long) value));
+        addTypeConverter(registry, org.apache.hc.core5.util.Timeout.class, java.lang.String.class, false,
+            (type, exchange, value) -> org.apache.camel.component.http.HttpConverters.toTimeout((java.lang.String) value));
+        addTypeConverter(registry, org.apache.hc.core5.util.Timeout.class, long.class, false,
+            (type, exchange, value) -> org.apache.camel.component.http.HttpConverters.toTimeout((long) value));
     }
 
     private static void addTypeConverter(TypeConverterRegistry registry, Class<?> toType, Class<?> fromType, boolean allowNull, SimpleTypeConverter.ConversionMethod method) { 
diff --git a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java
index 9c41e61ab7d..801fc56b1cf 100644
--- a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java
+++ b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java
@@ -40,9 +40,9 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         case "clearexpiredcookies":
         case "clearExpiredCookies": target.setClearExpiredCookies(property(camelContext, boolean.class, value)); return true;
         case "clientbuilder":
-        case "clientBuilder": target.setClientBuilder(property(camelContext, org.apache.http.impl.client.HttpClientBuilder.class, value)); return true;
+        case "clientBuilder": target.setClientBuilder(property(camelContext, org.apache.hc.client5.http.impl.classic.HttpClientBuilder.class, value)); return true;
         case "clientconnectionmanager":
-        case "clientConnectionManager": target.setClientConnectionManager(property(camelContext, org.apache.http.conn.HttpClientConnectionManager.class, value)); return true;
+        case "clientConnectionManager": target.setClientConnectionManager(property(camelContext, org.apache.hc.client5.http.io.HttpClientConnectionManager.class, value)); return true;
         case "connectionclose":
         case "connectionClose": target.setConnectionClose(property(camelContext, boolean.class, value)); return true;
         case "connectionsperroute":
@@ -50,7 +50,7 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         case "cookiehandler":
         case "cookieHandler": target.setCookieHandler(property(camelContext, org.apache.camel.http.base.cookie.CookieHandler.class, value)); return true;
         case "cookiestore":
-        case "cookieStore": target.setCookieStore(property(camelContext, org.apache.http.client.CookieStore.class, value)); return true;
+        case "cookieStore": target.setCookieStore(property(camelContext, org.apache.hc.client5.http.cookie.CookieStore.class, value)); return true;
         case "copyheaders":
         case "copyHeaders": target.setCopyHeaders(property(camelContext, boolean.class, value)); return true;
         case "customhostheader":
@@ -66,13 +66,15 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         case "headerfilterstrategy":
         case "headerFilterStrategy": target.setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true;
         case "httpclient":
-        case "httpClient": target.setHttpClient(property(camelContext, org.apache.http.client.HttpClient.class, value)); return true;
+        case "httpClient": target.setHttpClient(property(camelContext, org.apache.hc.client5.http.classic.HttpClient.class, value)); return true;
         case "httpclientconfigurer":
         case "httpClientConfigurer": target.setHttpClientConfigurer(property(camelContext, org.apache.camel.component.http.HttpClientConfigurer.class, value)); return true;
         case "httpclientoptions":
         case "httpClientOptions": target.setHttpClientOptions(property(camelContext, java.util.Map.class, value)); return true;
+        case "httpconnectionoptions":
+        case "httpConnectionOptions": target.setHttpConnectionOptions(property(camelContext, java.util.Map.class, value)); return true;
         case "httpcontext":
-        case "httpContext": target.setHttpContext(property(camelContext, org.apache.http.protocol.HttpContext.class, value)); return true;
+        case "httpContext": target.setHttpContext(property(camelContext, org.apache.hc.core5.http.protocol.HttpContext.class, value)); return true;
         case "httpmethod":
         case "httpMethod": target.setHttpMethod(property(camelContext, org.apache.camel.http.common.HttpMethods.class, value)); return true;
         case "ignoreresponsebody":
@@ -145,9 +147,9 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         case "clearexpiredcookies":
         case "clearExpiredCookies": return boolean.class;
         case "clientbuilder":
-        case "clientBuilder": return org.apache.http.impl.client.HttpClientBuilder.class;
+        case "clientBuilder": return org.apache.hc.client5.http.impl.classic.HttpClientBuilder.class;
         case "clientconnectionmanager":
-        case "clientConnectionManager": return org.apache.http.conn.HttpClientConnectionManager.class;
+        case "clientConnectionManager": return org.apache.hc.client5.http.io.HttpClientConnectionManager.class;
         case "connectionclose":
         case "connectionClose": return boolean.class;
         case "connectionsperroute":
@@ -155,7 +157,7 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         case "cookiehandler":
         case "cookieHandler": return org.apache.camel.http.base.cookie.CookieHandler.class;
         case "cookiestore":
-        case "cookieStore": return org.apache.http.client.CookieStore.class;
+        case "cookieStore": return org.apache.hc.client5.http.cookie.CookieStore.class;
         case "copyheaders":
         case "copyHeaders": return boolean.class;
         case "customhostheader":
@@ -171,13 +173,15 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         case "headerfilterstrategy":
         case "headerFilterStrategy": return org.apache.camel.spi.HeaderFilterStrategy.class;
         case "httpclient":
-        case "httpClient": return org.apache.http.client.HttpClient.class;
+        case "httpClient": return org.apache.hc.client5.http.classic.HttpClient.class;
         case "httpclientconfigurer":
         case "httpClientConfigurer": return org.apache.camel.component.http.HttpClientConfigurer.class;
         case "httpclientoptions":
         case "httpClientOptions": return java.util.Map.class;
+        case "httpconnectionoptions":
+        case "httpConnectionOptions": return java.util.Map.class;
         case "httpcontext":
-        case "httpContext": return org.apache.http.protocol.HttpContext.class;
+        case "httpContext": return org.apache.hc.core5.http.protocol.HttpContext.class;
         case "httpmethod":
         case "httpMethod": return org.apache.camel.http.common.HttpMethods.class;
         case "ignoreresponsebody":
@@ -282,6 +286,8 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         case "httpClientConfigurer": return target.getHttpClientConfigurer();
         case "httpclientoptions":
         case "httpClientOptions": return target.getHttpClientOptions();
+        case "httpconnectionoptions":
+        case "httpConnectionOptions": return target.getHttpConnectionOptions();
         case "httpcontext":
         case "httpContext": return target.getHttpContext();
         case "httpmethod":
@@ -339,6 +345,8 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "httpclientoptions":
         case "httpClientOptions": return java.lang.Object.class;
+        case "httpconnectionoptions":
+        case "httpConnectionOptions": return java.lang.Object.class;
         default: return null;
         }
     }
diff --git a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java
index 7e91843ef16..ee87c1e8562 100644
--- a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java
+++ b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java
@@ -22,7 +22,7 @@ public class HttpEndpointUriFactory extends org.apache.camel.support.component.E
     private static final Set<String> SECRET_PROPERTY_NAMES;
     private static final Set<String> MULTI_VALUE_PREFIXES;
     static {
-        Set<String> props = new HashSet<>(50);
+        Set<String> props = new HashSet<>(51);
         props.add("authDomain");
         props.add("authHost");
         props.add("authMethod");
@@ -48,6 +48,7 @@ public class HttpEndpointUriFactory extends org.apache.camel.support.component.E
         props.add("httpClient");
         props.add("httpClientConfigurer");
         props.add("httpClientOptions");
+        props.add("httpConnectionOptions");
         props.add("httpContext");
         props.add("httpMethod");
         props.add("httpUri");
@@ -80,8 +81,9 @@ public class HttpEndpointUriFactory extends org.apache.camel.support.component.E
         secretProps.add("proxyAuthPassword");
         secretProps.add("proxyAuthUsername");
         SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
-        Set<String> prefixes = new HashSet<>(1);
+        Set<String> prefixes = new HashSet<>(2);
         prefixes.add("httpClient.");
+        prefixes.add("httpConnection.");
         MULTI_VALUE_PREFIXES = Collections.unmodifiableSet(prefixes);
     }
 
diff --git a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java
index 2be78b1e51c..8027427883b 100644
--- a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java
+++ b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java
@@ -41,11 +41,11 @@ public final class HttpEntityConverterLoader implements TypeConverterLoader, Cam
     }
 
     private void registerConverters(TypeConverterRegistry registry) {
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, byte[].class, false,
+        addTypeConverter(registry, org.apache.hc.core5.http.HttpEntity.class, byte[].class, false,
             (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((byte[]) value, exchange));
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, java.io.InputStream.class, false,
+        addTypeConverter(registry, org.apache.hc.core5.http.HttpEntity.class, java.io.InputStream.class, false,
             (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((java.io.InputStream) value, exchange));
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, java.lang.String.class, false,
+        addTypeConverter(registry, org.apache.hc.core5.http.HttpEntity.class, java.lang.String.class, false,
             (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((java.lang.String) value, exchange));
     }
 
diff --git a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpTimeoutConverterLoader.java
similarity index 56%
copy from components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java
copy to components/camel-http/src/generated/java/org/apache/camel/component/http/HttpTimeoutConverterLoader.java
index 2be78b1e51c..2cad4863d98 100644
--- a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEntityConverterLoader.java
+++ b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpTimeoutConverterLoader.java
@@ -4,25 +4,21 @@ package org.apache.camel.component.http;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.DeferredContextBinding;
-import org.apache.camel.Exchange;
-import org.apache.camel.TypeConversionException;
 import org.apache.camel.TypeConverterLoaderException;
 import org.apache.camel.spi.TypeConverterLoader;
 import org.apache.camel.spi.TypeConverterRegistry;
 import org.apache.camel.support.SimpleTypeConverter;
-import org.apache.camel.support.TypeConverterSupport;
-import org.apache.camel.util.DoubleMap;
 
 /**
  * Generated by camel build tools - do NOT edit this file!
  */
 @SuppressWarnings("unchecked")
 @DeferredContextBinding
-public final class HttpEntityConverterLoader implements TypeConverterLoader, CamelContextAware {
+public final class HttpTimeoutConverterLoader implements TypeConverterLoader, CamelContextAware {
 
     private CamelContext camelContext;
 
-    public HttpEntityConverterLoader() {
+    public HttpTimeoutConverterLoader() {
     }
 
     @Override
@@ -41,12 +37,10 @@ public final class HttpEntityConverterLoader implements TypeConverterLoader, Cam
     }
 
     private void registerConverters(TypeConverterRegistry registry) {
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, byte[].class, false,
-            (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((byte[]) value, exchange));
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, java.io.InputStream.class, false,
-            (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((java.io.InputStream) value, exchange));
-        addTypeConverter(registry, org.apache.http.HttpEntity.class, java.lang.String.class, false,
-            (type, exchange, value) -> org.apache.camel.component.http.HttpEntityConverter.toHttpEntity((java.lang.String) value, exchange));
+        addTypeConverter(registry, org.apache.hc.core5.util.Timeout.class, java.lang.String.class, false,
+            (type, exchange, value) -> HttpConverters.toTimeout((java.lang.String) value));
+        addTypeConverter(registry, org.apache.hc.core5.util.Timeout.class, long.class, false,
+            (type, exchange, value) -> HttpConverters.toTimeout((long) value));
     }
 
     private static void addTypeConverter(TypeConverterRegistry registry, Class<?> toType, Class<?> fromType, boolean allowNull, SimpleTypeConverter.ConversionMethod method) { 
diff --git a/components/camel-http/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader b/components/camel-http/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
index 3641c41d69d..42287231588 100644
--- a/components/camel-http/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
+++ b/components/camel-http/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
@@ -1,2 +1,3 @@
 # Generated by camel build tools - do NOT edit this file!
+org.apache.camel.component.http.HttpConvertersLoader
 org.apache.camel.component.http.HttpEntityConverterLoader
diff --git a/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json b/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json
index 08d93e198b7..2cf9827c77e 100644
--- a/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json
+++ b/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json
@@ -3,7 +3,7 @@
     "kind": "component",
     "name": "http",
     "title": "HTTP",
-    "description": "Send requests to external HTTP servers using Apache HTTP Client 4.x.",
+    "description": "Send requests to external HTTP servers using Apache HTTP Client 5.x.",
     "deprecated": false,
     "deprecationNote": "",
     "firstVersion": "2.3.0",
@@ -27,7 +27,7 @@
   "componentProperties": {
     "followRedirects": { "kind": "property", "displayName": "Follow Redirects", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to the HTTP request should follow redirects. By default the HTTP request does not follow redirects" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
-    "cookieStore": { "kind": "property", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.http.client.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.http.client.CookieStore. By default the org.apache.http.impl.client.BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then t [...]
+    "cookieStore": { "kind": "property", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.cookie.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.hc.client5.http.cookie.CookieStore. By default the org.apache.hc.client5.http.cookie.BasicCookieStore is used which is an in-memory only cookie store. Notice i [...]
     "copyHeaders": { "kind": "property", "displayName": "Copy Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false, allows to only include the headers from the HTTP response (not  [...]
     "responsePayloadStreamingThreshold": { "kind": "property", "displayName": "Response Payload Streaming Threshold", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 8192, "description": "This threshold in bytes controls whether the response payload should be stored in memory as a byte array or be streaming based. Set this to -1 to always use st [...]
     "skipRequestHeaders": { "kind": "property", "displayName": "Skip Request Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip mapping all the Camel headers as HTTP request headers. If there are no data from Camel headers needed to be included in the HTTP request then this can avoid parsing over [...]
@@ -36,7 +36,7 @@
     "authCachingDisabled": { "kind": "property", "displayName": "Auth Caching Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables authentication scheme caching" },
     "automaticRetriesDisabled": { "kind": "property", "displayName": "Automatic Retries Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables automatic request recovery and re-execution" },
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
-    "clientConnectionManager": { "kind": "property", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.conn.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom and shared HttpClientConnectionManager to manage connections. If this has been configured then this is always used for all endpoints created by this component." },
+    "clientConnectionManager": { "kind": "property", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.io.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom and shared HttpClientConnectionManager to manage connections. If this has been configured then this is always used for all endpoints created by this comp [...]
     "connectionsPerRoute": { "kind": "property", "displayName": "Connections Per Route", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 20, "description": "The maximum number of connections per route." },
     "connectionStateDisabled": { "kind": "property", "displayName": "Connection State Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables connection state tracking" },
     "connectionTimeToLive": { "kind": "property", "displayName": "Connection Time To Live", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "The time for connection to live, the time unit is millisecond, the default value is always keep alive." },
@@ -46,7 +46,7 @@
     "httpBinding": { "kind": "property", "displayName": "Http Binding", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.http.common.HttpBinding", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpBinding to control the mapping between Camel message and HttpClient." },
     "httpClientConfigurer": { "kind": "property", "displayName": "Http Client Configurer", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.http.HttpClientConfigurer", "deprecated": false, "autowired": false, "secret": false, "description": "To use the custom HttpClientConfigurer to perform configuration of the HttpClient that will be used." },
     "httpConfiguration": { "kind": "property", "displayName": "Http Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.http.common.HttpConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared HttpConfiguration as base configuration." },
-    "httpContext": { "kind": "property", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.http.protocol.HttpContext when executing requests." },
+    "httpContext": { "kind": "property", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.core5.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.hc.core5.http.protocol.HttpContext when executing requests." },
     "maxTotalConnections": { "kind": "property", "displayName": "Max Total Connections", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 200, "description": "The maximum number of connections." },
     "redirectHandlingDisabled": { "kind": "property", "displayName": "Redirect Handling Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables automatic redirect handling" },
     "headerFilterStrategy": { "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." },
@@ -61,9 +61,11 @@
     "sslContextParameters": { "kind": "property", "displayName": "Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "description": "To configure security using SSLContextParameters. Important: Only one instance of org.apache.camel.support.jsse.SSLContextParameters is supported per HttpComponent. If you need to us [...]
     "useGlobalSslContextParameters": { "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." },
     "x509HostnameVerifier": { "kind": "property", "displayName": "X509 Hostname Verifier", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier." },
-    "connectionRequestTimeout": { "kind": "property", "displayName": "Connection Request Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "The timeout in milliseconds used when requesting a connection from the connection manager. A timeout value of zero is interpreted as an infinite timeout. A timeout value of zero is interpreted as an inf [...]
-    "connectTimeout": { "kind": "property", "displayName": "Connect Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "Determines the timeout in milliseconds until a connection is established. A timeout value of zero is interpreted as an infinite timeout. A timeout value of zero is interpreted as an infinite timeout. A negative value is int [...]
-    "socketTimeout": { "kind": "property", "displayName": "Socket Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "Defines the socket timeout in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infini [...]
+    "connectionRequestTimeout": { "kind": "property", "displayName": "Connection Request Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "3 minutes", "description": "Returns the connection lease request timeout used when requesting a connection from the connection manager. A timeout value of zero is interpreted as a disabled time [...]
+    "connectTimeout": { "kind": "property", "displayName": "Connect Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "3 minutes", "description": "Determines the timeout until a new connection is fully established. A timeout value of zero is interpreted as an infinite timeout." },
+    "responseTimeout": { "kind": "property", "displayName": "Response Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "description": "Determines the timeout until arrival of a response from the opposite endpoint. A timeout value of zero is interpreted as an infinite timeout. Please note that response timeout may be unsupport [...]
+    "socketTimeout": { "kind": "property", "displayName": "Socket Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "null (undefined)", "description": "Determines the default socket timeout value for I\/O operations." },
+    "soTimeout": { "kind": "property", "displayName": "So Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "3 minutes", "description": "Determines the default socket timeout value for blocking I\/O operations." }
   },
   "headers": {
     "Content-Encoding": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The HTTP content encoding. Is set on both the IN and OUT message to provide a content encoding, such as gzip.", "constantName": "org.apache.camel.component.http.HttpConstants#CONTENT_ENCODING" },
@@ -92,7 +94,7 @@
     "throwExceptionOnFailure": { "kind": "parameter", "displayName": "Throw Exception On Failure", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code." },
     "clearExpiredCookies": { "kind": "parameter", "displayName": "Clear Expired Cookies", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to clear expired cookies before sending the HTTP request. This ensures the cookies store does not keep growing by adding new cookies which is newer removed when they are expir [...]
     "cookieHandler": { "kind": "parameter", "displayName": "Cookie Handler", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.http.base.cookie.CookieHandler", "deprecated": false, "autowired": false, "secret": false, "description": "Configure a cookie handler to maintain a HTTP session" },
-    "cookieStore": { "kind": "parameter", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.http.client.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom CookieStore. By default the BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie stor [...]
+    "cookieStore": { "kind": "parameter", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.cookie.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom CookieStore. By default the BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop  [...]
     "copyHeaders": { "kind": "parameter", "displayName": "Copy Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false, allows to only include the headers from the HTTP response (not [...]
     "customHostHeader": { "kind": "parameter", "displayName": "Custom Host Header", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use custom host header for producer. When not set in query will be ignored. When set will override host header derived from url." },
     "deleteWithBody": { "kind": "parameter", "displayName": "Delete With Body", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the HTTP DELETE should include the message body or not. By default HTTP DELETE do not include any HTTP body. However in some rare cases users may need to be able to include the message [...]
@@ -104,13 +106,14 @@
     "skipRequestHeaders": { "kind": "parameter", "displayName": "Skip Request Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip mapping all the Camel headers as HTTP request headers. If there are no data from Camel headers needed to be included in the HTTP request then this can avoid parsing ove [...]
     "skipResponseHeaders": { "kind": "parameter", "displayName": "Skip Response Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip mapping all the HTTP response headers to Camel headers. If there are no data needed from HTTP headers then this can avoid parsing overhead with many object allocation [...]
     "userAgent": { "kind": "parameter", "displayName": "User Agent", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To set a custom HTTP User-Agent request header" },
-    "clientBuilder": { "kind": "parameter", "displayName": "Client Builder", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.impl.client.HttpClientBuilder", "deprecated": false, "autowired": false, "secret": false, "description": "Provide access to the http client request parameters used on new RequestConfig instances used by producers or consumers of this endpoint." },
-    "clientConnectionManager": { "kind": "parameter", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.conn.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpClientConnectionManager to manage connections" },
+    "clientBuilder": { "kind": "parameter", "displayName": "Client Builder", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.impl.classic.HttpClientBuilder", "deprecated": false, "autowired": false, "secret": false, "description": "Provide access to the http client request parameters used on new RequestConfig instances used by producers or consumers of this endpoint." },
+    "clientConnectionManager": { "kind": "parameter", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.io.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpClientConnectionManager to manage connections" },
     "connectionsPerRoute": { "kind": "parameter", "displayName": "Connections Per Route", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 20, "description": "The maximum number of connections per route." },
-    "httpClient": { "kind": "parameter", "displayName": "Http Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.client.HttpClient", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a custom HttpClient to be used by the producer" },
+    "httpClient": { "kind": "parameter", "displayName": "Http Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.classic.HttpClient", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a custom HttpClient to be used by the producer" },
     "httpClientConfigurer": { "kind": "parameter", "displayName": "Http Client Configurer", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.http.HttpClientConfigurer", "deprecated": false, "autowired": false, "secret": false, "description": "Register a custom configuration strategy for new HttpClient instances created by producers or consumers such as to configure authentication mechanisms etc." },
     "httpClientOptions": { "kind": "parameter", "displayName": "Http Client Options", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "httpClient.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "To configure the HttpClient using the key\/values from the Map." },
-    "httpContext": { "kind": "parameter", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpContext instance" },
+    "httpConnectionOptions": { "kind": "parameter", "displayName": "Http Connection Options", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "httpConnection.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "To configure the connection and the socket using the key\/values from the Map." },
+    "httpContext": { "kind": "parameter", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.core5.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpContext instance" },
     "maxTotalConnections": { "kind": "parameter", "displayName": "Max Total Connections", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 200, "description": "The maximum number of connections." },
     "useSystemProperties": { "kind": "parameter", "displayName": "Use System Properties", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "To use System Properties as fallback for configuration" },
     "proxyAuthDomain": { "kind": "parameter", "displayName": "Proxy Auth Domain", "group": "proxy", "label": "producer,proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Proxy authentication domain to use with NTML" },
diff --git a/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json b/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json
index 6974e979e64..36e3597ad93 100644
--- a/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json
+++ b/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json
@@ -3,7 +3,7 @@
     "kind": "component",
     "name": "https",
     "title": "HTTPS (Secure)",
-    "description": "Send requests to external HTTP servers using Apache HTTP Client 4.x.",
+    "description": "Send requests to external HTTP servers using Apache HTTP Client 5.x.",
     "deprecated": false,
     "deprecationNote": "",
     "firstVersion": "2.3.0",
@@ -27,7 +27,7 @@
   "componentProperties": {
     "followRedirects": { "kind": "property", "displayName": "Follow Redirects", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to the HTTP request should follow redirects. By default the HTTP request does not follow redirects" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
-    "cookieStore": { "kind": "property", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.http.client.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.http.client.CookieStore. By default the org.apache.http.impl.client.BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then t [...]
+    "cookieStore": { "kind": "property", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.cookie.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.hc.client5.http.cookie.CookieStore. By default the org.apache.hc.client5.http.cookie.BasicCookieStore is used which is an in-memory only cookie store. Notice i [...]
     "copyHeaders": { "kind": "property", "displayName": "Copy Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false, allows to only include the headers from the HTTP response (not  [...]
     "responsePayloadStreamingThreshold": { "kind": "property", "displayName": "Response Payload Streaming Threshold", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 8192, "description": "This threshold in bytes controls whether the response payload should be stored in memory as a byte array or be streaming based. Set this to -1 to always use st [...]
     "skipRequestHeaders": { "kind": "property", "displayName": "Skip Request Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip mapping all the Camel headers as HTTP request headers. If there are no data from Camel headers needed to be included in the HTTP request then this can avoid parsing over [...]
@@ -36,7 +36,7 @@
     "authCachingDisabled": { "kind": "property", "displayName": "Auth Caching Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables authentication scheme caching" },
     "automaticRetriesDisabled": { "kind": "property", "displayName": "Automatic Retries Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables automatic request recovery and re-execution" },
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
-    "clientConnectionManager": { "kind": "property", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.conn.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom and shared HttpClientConnectionManager to manage connections. If this has been configured then this is always used for all endpoints created by this component." },
+    "clientConnectionManager": { "kind": "property", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.io.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom and shared HttpClientConnectionManager to manage connections. If this has been configured then this is always used for all endpoints created by this comp [...]
     "connectionsPerRoute": { "kind": "property", "displayName": "Connections Per Route", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 20, "description": "The maximum number of connections per route." },
     "connectionStateDisabled": { "kind": "property", "displayName": "Connection State Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables connection state tracking" },
     "connectionTimeToLive": { "kind": "property", "displayName": "Connection Time To Live", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "The time for connection to live, the time unit is millisecond, the default value is always keep alive." },
@@ -46,7 +46,7 @@
     "httpBinding": { "kind": "property", "displayName": "Http Binding", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.http.common.HttpBinding", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpBinding to control the mapping between Camel message and HttpClient." },
     "httpClientConfigurer": { "kind": "property", "displayName": "Http Client Configurer", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.http.HttpClientConfigurer", "deprecated": false, "autowired": false, "secret": false, "description": "To use the custom HttpClientConfigurer to perform configuration of the HttpClient that will be used." },
     "httpConfiguration": { "kind": "property", "displayName": "Http Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.http.common.HttpConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared HttpConfiguration as base configuration." },
-    "httpContext": { "kind": "property", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.http.protocol.HttpContext when executing requests." },
+    "httpContext": { "kind": "property", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.core5.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.hc.core5.http.protocol.HttpContext when executing requests." },
     "maxTotalConnections": { "kind": "property", "displayName": "Max Total Connections", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 200, "description": "The maximum number of connections." },
     "redirectHandlingDisabled": { "kind": "property", "displayName": "Redirect Handling Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables automatic redirect handling" },
     "headerFilterStrategy": { "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." },
@@ -61,9 +61,11 @@
     "sslContextParameters": { "kind": "property", "displayName": "Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, "autowired": false, "secret": false, "description": "To configure security using SSLContextParameters. Important: Only one instance of org.apache.camel.support.jsse.SSLContextParameters is supported per HttpComponent. If you need to us [...]
     "useGlobalSslContextParameters": { "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." },
     "x509HostnameVerifier": { "kind": "property", "displayName": "X509 Hostname Verifier", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier." },
-    "connectionRequestTimeout": { "kind": "property", "displayName": "Connection Request Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "The timeout in milliseconds used when requesting a connection from the connection manager. A timeout value of zero is interpreted as an infinite timeout. A timeout value of zero is interpreted as an inf [...]
-    "connectTimeout": { "kind": "property", "displayName": "Connect Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "Determines the timeout in milliseconds until a connection is established. A timeout value of zero is interpreted as an infinite timeout. A timeout value of zero is interpreted as an infinite timeout. A negative value is int [...]
-    "socketTimeout": { "kind": "property", "displayName": "Socket Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": -1, "description": "Defines the socket timeout in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infini [...]
+    "connectionRequestTimeout": { "kind": "property", "displayName": "Connection Request Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "3 minutes", "description": "Returns the connection lease request timeout used when requesting a connection from the connection manager. A timeout value of zero is interpreted as a disabled time [...]
+    "connectTimeout": { "kind": "property", "displayName": "Connect Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "3 minutes", "description": "Determines the timeout until a new connection is fully established. A timeout value of zero is interpreted as an infinite timeout." },
+    "responseTimeout": { "kind": "property", "displayName": "Response Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "description": "Determines the timeout until arrival of a response from the opposite endpoint. A timeout value of zero is interpreted as an infinite timeout. Please note that response timeout may be unsupport [...]
+    "socketTimeout": { "kind": "property", "displayName": "Socket Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "null (undefined)", "description": "Determines the default socket timeout value for I\/O operations." },
+    "soTimeout": { "kind": "property", "displayName": "So Timeout", "group": "timeout", "label": "timeout", "required": false, "type": "object", "javaType": "org.apache.hc.core5.util.Timeout", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "3 minutes", "description": "Determines the default socket timeout value for blocking I\/O operations." }
   },
   "headers": {
     "Content-Encoding": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The HTTP content encoding. Is set on both the IN and OUT message to provide a content encoding, such as gzip.", "constantName": "org.apache.camel.component.http.HttpConstants#CONTENT_ENCODING" },
@@ -92,7 +94,7 @@
     "throwExceptionOnFailure": { "kind": "parameter", "displayName": "Throw Exception On Failure", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code." },
     "clearExpiredCookies": { "kind": "parameter", "displayName": "Clear Expired Cookies", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to clear expired cookies before sending the HTTP request. This ensures the cookies store does not keep growing by adding new cookies which is newer removed when they are expir [...]
     "cookieHandler": { "kind": "parameter", "displayName": "Cookie Handler", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.http.base.cookie.CookieHandler", "deprecated": false, "autowired": false, "secret": false, "description": "Configure a cookie handler to maintain a HTTP session" },
-    "cookieStore": { "kind": "parameter", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.http.client.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom CookieStore. By default the BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie stor [...]
+    "cookieStore": { "kind": "parameter", "displayName": "Cookie Store", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.cookie.CookieStore", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom CookieStore. By default the BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop  [...]
     "copyHeaders": { "kind": "parameter", "displayName": "Copy Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false, allows to only include the headers from the HTTP response (not [...]
     "customHostHeader": { "kind": "parameter", "displayName": "Custom Host Header", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use custom host header for producer. When not set in query will be ignored. When set will override host header derived from url." },
     "deleteWithBody": { "kind": "parameter", "displayName": "Delete With Body", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the HTTP DELETE should include the message body or not. By default HTTP DELETE do not include any HTTP body. However in some rare cases users may need to be able to include the message [...]
@@ -104,13 +106,14 @@
     "skipRequestHeaders": { "kind": "parameter", "displayName": "Skip Request Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip mapping all the Camel headers as HTTP request headers. If there are no data from Camel headers needed to be included in the HTTP request then this can avoid parsing ove [...]
     "skipResponseHeaders": { "kind": "parameter", "displayName": "Skip Response Headers", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to skip mapping all the HTTP response headers to Camel headers. If there are no data needed from HTTP headers then this can avoid parsing overhead with many object allocation [...]
     "userAgent": { "kind": "parameter", "displayName": "User Agent", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To set a custom HTTP User-Agent request header" },
-    "clientBuilder": { "kind": "parameter", "displayName": "Client Builder", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.impl.client.HttpClientBuilder", "deprecated": false, "autowired": false, "secret": false, "description": "Provide access to the http client request parameters used on new RequestConfig instances used by producers or consumers of this endpoint." },
-    "clientConnectionManager": { "kind": "parameter", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.conn.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpClientConnectionManager to manage connections" },
+    "clientBuilder": { "kind": "parameter", "displayName": "Client Builder", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.impl.classic.HttpClientBuilder", "deprecated": false, "autowired": false, "secret": false, "description": "Provide access to the http client request parameters used on new RequestConfig instances used by producers or consumers of this endpoint." },
+    "clientConnectionManager": { "kind": "parameter", "displayName": "Client Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.io.HttpClientConnectionManager", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpClientConnectionManager to manage connections" },
     "connectionsPerRoute": { "kind": "parameter", "displayName": "Connections Per Route", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 20, "description": "The maximum number of connections per route." },
-    "httpClient": { "kind": "parameter", "displayName": "Http Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.client.HttpClient", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a custom HttpClient to be used by the producer" },
+    "httpClient": { "kind": "parameter", "displayName": "Http Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.client5.http.classic.HttpClient", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a custom HttpClient to be used by the producer" },
     "httpClientConfigurer": { "kind": "parameter", "displayName": "Http Client Configurer", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.http.HttpClientConfigurer", "deprecated": false, "autowired": false, "secret": false, "description": "Register a custom configuration strategy for new HttpClient instances created by producers or consumers such as to configure authentication mechanisms etc." },
     "httpClientOptions": { "kind": "parameter", "displayName": "Http Client Options", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "httpClient.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "To configure the HttpClient using the key\/values from the Map." },
-    "httpContext": { "kind": "parameter", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpContext instance" },
+    "httpConnectionOptions": { "kind": "parameter", "displayName": "Http Connection Options", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "httpConnection.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "To configure the connection and the socket using the key\/values from the Map." },
+    "httpContext": { "kind": "parameter", "displayName": "Http Context", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hc.core5.http.protocol.HttpContext", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HttpContext instance" },
     "maxTotalConnections": { "kind": "parameter", "displayName": "Max Total Connections", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 200, "description": "The maximum number of connections." },
     "useSystemProperties": { "kind": "parameter", "displayName": "Use System Properties", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "To use System Properties as fallback for configuration" },
     "proxyAuthDomain": { "kind": "parameter", "displayName": "Proxy Auth Domain", "group": "proxy", "label": "producer,proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Proxy authentication domain to use with NTML" },
diff --git a/components/camel-http/src/main/docs/http-component.adoc b/components/camel-http/src/main/docs/http-component.adoc
index 9167c54551b..64d9794e2d1 100644
--- a/components/camel-http/src/main/docs/http-component.adoc
+++ b/components/camel-http/src/main/docs/http-component.adoc
@@ -2,7 +2,7 @@
 :doctitle: HTTP
 :shortname: http
 :artifactid: camel-http
-:description: Send requests to external HTTP servers using Apache HTTP Client 4.x.
+:description: Send requests to external HTTP servers using Apache HTTP Client 5.x.
 :since: 2.3
 :supportlevel: Stable
 :component-header: Only producer is supported
@@ -66,7 +66,7 @@ HTTP response headers as well to the OUT message headers.
 == Using System Properties
 
 When setting useSystemProperties to true, the HTTP Client will look for
-the following System Properties and it will use it:
+the following System Properties, and it will use it:
 
 * ssl.TrustManagerFactory.algorithm
 * http://javax.net/[javax.net].ssl.trustStoreType
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java
index ce57f2cb039..8ca73426032 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java
@@ -16,14 +16,14 @@
  */
 package org.apache.camel.component.http;
 
-import org.apache.http.auth.Credentials;
-import org.apache.http.auth.NTCredentials;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.hc.client5.http.auth.Credentials;
+import org.apache.hc.client5.http.auth.NTCredentials;
+import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
 
 public class BasicAuthenticationHttpClientConfigurer implements HttpClientConfigurer {
     private final String username;
-    private final String password;
+    private final char[] password;
     private final String domain;
     private final String host;
     private final HttpCredentialsHelper credentialsHelper;
@@ -31,7 +31,7 @@ public class BasicAuthenticationHttpClientConfigurer implements HttpClientConfig
     public BasicAuthenticationHttpClientConfigurer(String user, String pwd, String domain, String host,
                                                    HttpCredentialsHelper credentialsHelper) {
         this.username = user;
-        this.password = pwd;
+        this.password = pwd == null ? new char[0] : pwd.toCharArray();
         this.domain = domain;
         this.host = host;
         this.credentialsHelper = credentialsHelper;
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/CompositeHttpConfigurer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/CompositeHttpConfigurer.java
index 04e3ddd5c4b..052ba009249 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/CompositeHttpConfigurer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/CompositeHttpConfigurer.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.http;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
 
 public class CompositeHttpConfigurer implements HttpClientConfigurer {
 
@@ -31,10 +31,6 @@ public class CompositeHttpConfigurer implements HttpClientConfigurer {
         }
     }
 
-    public void removeConfigurer(HttpClientConfigurer configurer) {
-        configurers.remove(configurer);
-    }
-
     @Override
     public void configureHttpClient(HttpClientBuilder clientBuilder) {
         for (HttpClientConfigurer configurer : configurers) {
@@ -44,9 +40,9 @@ public class CompositeHttpConfigurer implements HttpClientConfigurer {
 
     public static CompositeHttpConfigurer combineConfigurers(
             HttpClientConfigurer oldConfigurer, HttpClientConfigurer newConfigurer) {
-        if (oldConfigurer instanceof CompositeHttpConfigurer) {
-            ((CompositeHttpConfigurer) oldConfigurer).addConfigurer(newConfigurer);
-            return (CompositeHttpConfigurer) oldConfigurer;
+        if (oldConfigurer instanceof CompositeHttpConfigurer compositeHttpConfigurer) {
+            compositeHttpConfigurer.addConfigurer(newConfigurer);
+            return compositeHttpConfigurer;
         } else {
             CompositeHttpConfigurer answer = new CompositeHttpConfigurer();
             answer.addConfigurer(newConfigurer);
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpClientConfigurer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpClientConfigurer.java
index f2f01ca887b..5443c749c49 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpClientConfigurer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpClientConfigurer.java
@@ -16,7 +16,7 @@
  */
 package org.apache.camel.component.http;
 
-import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
 
 /**
  * A pluggable strategy for configuring the HttpClient used by this component
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
index 0c34356105a..322831c8566 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
@@ -22,7 +22,6 @@ import java.security.GeneralSecurityException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
-import java.util.concurrent.TimeUnit;
 
 import javax.net.ssl.HostnameVerifier;
 
@@ -54,20 +53,25 @@ import org.apache.camel.util.PropertiesHelper;
 import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.URISupport;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
-import org.apache.http.client.CookieStore;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.config.Registry;
-import org.apache.http.config.RegistryBuilder;
-import org.apache.http.conn.HttpClientConnectionManager;
-import org.apache.http.conn.socket.ConnectionSocketFactory;
-import org.apache.http.conn.socket.PlainConnectionSocketFactory;
-import org.apache.http.conn.ssl.DefaultHostnameVerifier;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.impl.client.LaxRedirectStrategy;
-import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.ssl.SSLContexts;
+import org.apache.hc.client5.http.config.ConnectionConfig;
+import org.apache.hc.client5.http.config.RequestConfig;
+import org.apache.hc.client5.http.cookie.CookieStore;
+import org.apache.hc.client5.http.impl.DefaultRedirectStrategy;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
+import org.apache.hc.client5.http.io.HttpClientConnectionManager;
+import org.apache.hc.client5.http.socket.ConnectionSocketFactory;
+import org.apache.hc.client5.http.socket.PlainConnectionSocketFactory;
+import org.apache.hc.client5.http.ssl.DefaultHostnameVerifier;
+import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
+import org.apache.hc.core5.http.config.Registry;
+import org.apache.hc.core5.http.config.RegistryBuilder;
+import org.apache.hc.core5.http.io.SocketConfig;
+import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.pool.PoolConcurrencyPolicy;
+import org.apache.hc.core5.ssl.SSLContexts;
+import org.apache.hc.core5.util.TimeValue;
+import org.apache.hc.core5.util.Timeout;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -86,7 +90,8 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
     @Metadata(label = "advanced", description = "To use a custom and shared HttpClientConnectionManager to manage connections."
                                                 + " If this has been configured then this is always used for all endpoints created by this component.")
     protected HttpClientConnectionManager clientConnectionManager;
-    @Metadata(label = "advanced", description = "To use a custom org.apache.http.protocol.HttpContext when executing requests.")
+    @Metadata(label = "advanced",
+              description = "To use a custom org.apache.hc.core5.http.protocol.HttpContext when executing requests.")
     protected HttpContext httpContext;
     @Metadata(label = "security", description = "To configure security using SSLContextParameters."
                                                 + " Important: Only one instance of org.apache.camel.support.jsse.SSLContextParameters is supported per HttpComponent."
@@ -95,31 +100,39 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
     @Metadata(label = "security",
               description = "To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier.")
     protected HostnameVerifier x509HostnameVerifier = new DefaultHostnameVerifier();
-    @Metadata(label = "producer,advanced", description = "To use a custom org.apache.http.client.CookieStore."
-                                                         + " By default the org.apache.http.impl.client.BasicCookieStore is used which is an in-memory only cookie store."
+    @Metadata(label = "producer,advanced", description = "To use a custom org.apache.hc.client5.http.cookie.CookieStore."
+                                                         + " By default the org.apache.hc.client5.http.cookie.BasicCookieStore is used which is an in-memory only cookie store."
                                                          + " Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie store as cookie"
                                                          + " shouldn't be stored as we are just bridging (eg acting as a proxy).")
     protected CookieStore cookieStore;
 
     // timeout
-    @Metadata(label = "timeout", defaultValue = "-1",
-              description = "The timeout in milliseconds used when requesting a connection"
-                            + " from the connection manager. A timeout value of zero is interpreted as an infinite timeout."
-                            + " A timeout value of zero is interpreted as an infinite timeout."
-                            + " A negative value is interpreted as undefined (system default).")
-    protected int connectionRequestTimeout = -1;
-    @Metadata(label = "timeout", defaultValue = "-1",
-              description = "Determines the timeout in milliseconds until a connection is established."
-                            + " A timeout value of zero is interpreted as an infinite timeout."
-                            + " A timeout value of zero is interpreted as an infinite timeout."
-                            + " A negative value is interpreted as undefined (system default).")
-    protected int connectTimeout = -1;
-    @Metadata(label = "timeout", defaultValue = "-1", description = "Defines the socket timeout in milliseconds,"
-                                                                    + " which is the timeout for waiting for data  or, put differently,"
-                                                                    + " a maximum period inactivity between two consecutive data packets)."
-                                                                    + " A timeout value of zero is interpreted as an infinite timeout."
-                                                                    + " A negative value is interpreted as undefined (system default).")
-    protected int socketTimeout = -1;
+    @Metadata(label = "timeout", defaultValue = "3 minutes",
+              description = "Returns the connection lease request timeout used when requesting"
+                            + " a connection from the connection manager."
+                            + " A timeout value of zero is interpreted as a disabled timeout.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    protected Timeout connectionRequestTimeout = Timeout.ofMinutes(3);
+    @Metadata(label = "timeout", defaultValue = "3 minutes",
+              description = "Determines the timeout until a new connection is fully established."
+                            + " A timeout value of zero is interpreted as an infinite timeout.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    protected Timeout connectTimeout = Timeout.ofMinutes(3);
+    @Metadata(label = "timeout", defaultValue = "null (undefined)",
+              description = "Determines the default socket timeout value for I/O operations.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    protected Timeout socketTimeout;
+    @Metadata(label = "timeout", defaultValue = "3 minutes",
+              description = "Determines the default socket timeout value for blocking I/O operations.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    protected Timeout soTimeout = Timeout.ofMinutes(3);
+    @Metadata(label = "timeout", defaultValue = "0",
+              description = "Determines the timeout until arrival of a response from the opposite"
+                            + " endpoint. A timeout value of zero is interpreted as an infinite timeout."
+                            + " Please note that response timeout may be unsupported by HTTP transports "
+                            + "with message multiplexing.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    protected Timeout responseTimeout = Timeout.ofMilliseconds(0);
 
     // proxy
     @Metadata(label = "producer,proxy", enums = "http,https", description = "Proxy authentication protocol scheme")
@@ -293,21 +306,28 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         final Map<String, Object> httpClientOptions = new HashMap<>();
 
         // timeout values can be configured on both component and endpoint level, where endpoint take priority
-        int valConnectionRequestTimeout
-                = getAndRemoveParameter(parameters, "connectionRequestTimeout", int.class, connectionRequestTimeout);
-        if (valConnectionRequestTimeout != -1) {
+        Timeout valConnectionRequestTimeout
+                = getAndRemoveParameter(parameters, "connectionRequestTimeout", Timeout.class, connectionRequestTimeout);
+        if (!Timeout.ofMinutes(3).equals(valConnectionRequestTimeout)) {
             httpClientOptions.put("connectionRequestTimeout", valConnectionRequestTimeout);
         }
-        int valConnectTimeout = getAndRemoveParameter(parameters, "connectTimeout", int.class, connectTimeout);
-        if (valConnectTimeout != -1) {
-            httpClientOptions.put("connectTimeout", valConnectTimeout);
+        Timeout valResponseTimeout = getAndRemoveParameter(parameters, "responseTimeout", Timeout.class, responseTimeout);
+        if (!Timeout.ofMilliseconds(0).equals(valResponseTimeout)) {
+            httpClientOptions.put("responseTimeout", valResponseTimeout);
         }
-        int valSocketTimeout = getAndRemoveParameter(parameters, "socketTimeout", int.class, socketTimeout);
-        if (valSocketTimeout != -1) {
-            httpClientOptions.put("socketTimeout", valSocketTimeout);
+        final Map<String, Object> httpConnectionOptions = new HashMap<>();
+        Timeout valConnectTimeout = getAndRemoveParameter(parameters, "connectTimeout", Timeout.class, connectTimeout);
+        if (!Timeout.ofMinutes(3).equals(valConnectTimeout)) {
+            httpConnectionOptions.put("connectTimeout", valConnectTimeout);
+        }
+        Timeout valSocketTimeout = getAndRemoveParameter(parameters, "socketTimeout", Timeout.class, socketTimeout);
+        if (valSocketTimeout != null) {
+            httpConnectionOptions.put("socketTimeout", valSocketTimeout);
+        }
+        Timeout valSoTimeout = getAndRemoveParameter(parameters, "soTimeout", Timeout.class, soTimeout);
+        if (!Timeout.ofMinutes(3).equals(valSoTimeout)) {
+            httpConnectionOptions.put("soTimeout", valSoTimeout);
         }
-
-        final HttpClientBuilder clientBuilder = createHttpClientBuilder(uri, parameters, httpClientOptions);
 
         HttpBinding httpBinding = resolveAndRemoveReferenceParameter(parameters, "httpBinding", HttpBinding.class);
         HttpContext httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContext", HttpContext.class);
@@ -371,9 +391,13 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         String endpointUriString = endpointUri.toString();
 
         LOG.debug("Creating endpoint uri {}", endpointUriString);
-        final HttpClientConnectionManager localConnectionManager = createConnectionManager(parameters, sslContextParameters);
+        final HttpClientConnectionManager localConnectionManager
+                = createConnectionManager(parameters, sslContextParameters, httpConnectionOptions);
+        final HttpClientBuilder clientBuilder = createHttpClientBuilder(uri, parameters, httpClientOptions);
         HttpEndpoint endpoint = new HttpEndpoint(endpointUriString, this, clientBuilder, localConnectionManager, configurer);
+        endpoint.setResponseTimeout(valResponseTimeout);
         endpoint.setSocketTimeout(valSocketTimeout);
+        endpoint.setSoTimeout(valSoTimeout);
         endpoint.setConnectTimeout(valConnectTimeout);
         endpoint.setConnectionRequestTimeout(valConnectionRequestTimeout);
         endpoint.setCopyHeaders(copyHeaders);
@@ -427,13 +451,13 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
             endpoint.setCookieStore(getCookieStore());
         }
         endpoint.setHttpClientOptions(httpClientOptions);
-
+        endpoint.setHttpConnectionOptions(httpConnectionOptions);
         return endpoint;
     }
 
     protected HttpClientConnectionManager createConnectionManager(
             final Map<String, Object> parameters,
-            final SSLContextParameters sslContextParameters)
+            final SSLContextParameters sslContextParameters, Map<String, Object> httpConnectionOptions)
             throws GeneralSecurityException, IOException {
         if (clientConnectionManager != null) {
             return clientConnectionManager;
@@ -452,7 +476,15 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         final Registry<ConnectionSocketFactory> connectionRegistry
                 = createConnectionRegistry(hostnameVerifier, sslContextParameters, useSystemProperties);
 
-        return createConnectionManager(connectionRegistry, maxTotalConnections, connectionsPerRoute);
+        // allow the builder pattern
+        httpConnectionOptions.putAll(PropertiesHelper.extractProperties(parameters, "httpConnection."));
+        SocketConfig.Builder socketConfigBuilder = SocketConfig.custom();
+        PropertyBindingSupport.bindProperties(getCamelContext(), socketConfigBuilder, httpConnectionOptions);
+        ConnectionConfig.Builder connectionConfigBuilder = ConnectionConfig.custom();
+        PropertyBindingSupport.bindProperties(getCamelContext(), connectionConfigBuilder, httpConnectionOptions);
+
+        return createConnectionManager(connectionRegistry, maxTotalConnections, connectionsPerRoute,
+                socketConfigBuilder.build(), connectionConfigBuilder.build());
     }
 
     protected HttpClientBuilder createHttpClientBuilder(
@@ -496,7 +528,7 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
             clientBuilder.disableDefaultUserAgent();
         }
         if (fr) {
-            clientBuilder.setRedirectStrategy(new LaxRedirectStrategy());
+            clientBuilder.setRedirectStrategy(DefaultRedirectStrategy.INSTANCE);
         }
 
         return clientBuilder;
@@ -507,7 +539,7 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
             boolean useSystemProperties)
             throws GeneralSecurityException, IOException {
         // create the default connection registry to use
-        RegistryBuilder<ConnectionSocketFactory> builder = RegistryBuilder.<ConnectionSocketFactory> create();
+        RegistryBuilder<ConnectionSocketFactory> builder = RegistryBuilder.create();
         builder.register("http", PlainConnectionSocketFactory.getSocketFactory());
         if (sslContextParams != null) {
             builder.register("https",
@@ -520,15 +552,12 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         return builder.build();
     }
 
-    protected HttpClientConnectionManager createConnectionManager(Registry<ConnectionSocketFactory> registry) {
-        return createConnectionManager(registry, 0, 0);
-    }
-
     protected HttpClientConnectionManager createConnectionManager(
-            Registry<ConnectionSocketFactory> registry, int maxTotalConnections, int connectionsPerRoute) {
+            Registry<ConnectionSocketFactory> registry, int maxTotalConnections, int connectionsPerRoute,
+            SocketConfig defaultSocketConfig, ConnectionConfig defaultConnectionConfig) {
         // setup the connection live time
         PoolingHttpClientConnectionManager answer = new PoolingHttpClientConnectionManager(
-                registry, null, null, null, getConnectionTimeToLive(), TimeUnit.MILLISECONDS);
+                registry, PoolConcurrencyPolicy.STRICT, TimeValue.ofMilliseconds(getConnectionTimeToLive()), null);
         int localMaxTotalConnections = maxTotalConnections;
         if (localMaxTotalConnections == 0) {
             localMaxTotalConnections = getMaxTotalConnections();
@@ -536,6 +565,8 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         if (localMaxTotalConnections > 0) {
             answer.setMaxTotal(localMaxTotalConnections);
         }
+        answer.setDefaultSocketConfig(defaultSocketConfig);
+        answer.setDefaultConnectionConfig(defaultConnectionConfig);
         int localConnectionsPerRoute = connectionsPerRoute;
         if (localConnectionsPerRoute == 0) {
             localConnectionsPerRoute = getConnectionsPerRoute();
@@ -553,6 +584,7 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         return false;
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public Producer createProducer(
             CamelContext camelContext, String host,
@@ -594,7 +626,7 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
             url = url + "?" + query;
         }
 
-        parameters = parameters != null ? new HashMap<>(parameters) : new HashMap<String, Object>();
+        parameters = parameters != null ? new HashMap<>(parameters) : new HashMap<>();
 
         // there are cases where we might end up here without component being created beforehand
         // we need to abide by the component properties specified in the parameters when creating
@@ -729,60 +761,87 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         this.cookieStore = cookieStore;
     }
 
-    public int getConnectionRequestTimeout() {
+    public Timeout getConnectionRequestTimeout() {
         return connectionRequestTimeout;
     }
 
     /**
-     * The timeout in milliseconds used when requesting a connection from the connection manager.
+     * Returns the connection lease request timeout used when requesting a connection from the connection manager.
      * <p>
-     * A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined
-     * (system default).
+     * A timeout value of zero is interpreted as a disabled timeout.
      * </p>
      * <p>
-     * Default: -1
+     * Default: 3 minutes
      * </p>
      */
-    public void setConnectionRequestTimeout(int connectionRequestTimeout) {
+    public void setConnectionRequestTimeout(Timeout connectionRequestTimeout) {
         this.connectionRequestTimeout = connectionRequestTimeout;
     }
 
-    public int getConnectTimeout() {
+    public Timeout getConnectTimeout() {
         return connectTimeout;
     }
 
     /**
-     * Determines the timeout in milliseconds until a connection is established. A timeout value of zero is interpreted
-     * as an infinite timeout.
+     * Determines the timeout until a new connection is fully established. This may also include transport security
+     * negotiation exchanges such as {@code SSL} or {@code TLS} protocol negotiation).
      * <p>
-     * A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined
-     * (system default).
+     * A timeout value of zero is interpreted as an infinite timeout.
      * </p>
      * <p>
-     * Default: -1
+     * Default: 3 minutes
      * </p>
      */
-    public void setConnectTimeout(int connectTimeout) {
+    public void setConnectTimeout(Timeout connectTimeout) {
         this.connectTimeout = connectTimeout;
     }
 
-    public int getSocketTimeout() {
+    public Timeout getSocketTimeout() {
         return socketTimeout;
     }
 
     /**
-     * Defines the socket timeout (SO_TIMEOUT) in milliseconds, which is the timeout for waiting for data or, put
-     * differently, a maximum period inactivity between two consecutive data packets).
+     * Determines the default socket timeout value for I/O operations.
      * <p>
-     * A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined
-     * (system default).
+     * Default: {@code null} (undefined)
      * </p>
+     */
+    public void setSocketTimeout(Timeout socketTimeout) {
+        this.socketTimeout = socketTimeout;
+    }
+
+    public Timeout getSoTimeout() {
+        return soTimeout;
+    }
+
+    /**
+     * Determines the default socket timeout value for blocking I/O operations.
      * <p>
-     * Default: -1
+     * Default: 3 minutes
      * </p>
      */
-    public void setSocketTimeout(int socketTimeout) {
-        this.socketTimeout = socketTimeout;
+    public void setSoTimeout(Timeout soTimeout) {
+        this.soTimeout = soTimeout;
+    }
+
+    public Timeout getResponseTimeout() {
+        return responseTimeout;
+    }
+
+    /**
+     * Determines the timeout until arrival of a response from the opposite endpoint.
+     * <p>
+     * A timeout value of zero is interpreted as an infinite timeout.
+     * </p>
+     * <p>
+     * Please note that response timeout may be unsupported by HTTP transports with message multiplexing.
+     * </p>
+     * <p>
+     * Default: {@code 0}
+     * </p>
+     */
+    public void setResponseTimeout(Timeout responseTimeout) {
+        this.responseTimeout = responseTimeout;
     }
 
     public String getProxyAuthScheme() {
@@ -963,7 +1022,7 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         // shutdown connection manager
         if (clientConnectionManager != null) {
             LOG.info("Shutting down ClientConnectionManager: {}", clientConnectionManager);
-            clientConnectionManager.shutdown();
+            clientConnectionManager.close();
             clientConnectionManager = null;
         }
 
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponentVerifierExtension.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponentVerifierExtension.java
index c72b4697baa..b9d2d30210a 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponentVerifierExtension.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponentVerifierExtension.java
@@ -28,12 +28,10 @@ import org.apache.camel.component.extension.verifier.ResultErrorBuilder;
 import org.apache.camel.http.base.HttpHelper;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.hc.client5.http.classic.methods.HttpGet;
+import org.apache.hc.client5.http.config.RequestConfig;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
 
 final class HttpComponentVerifierExtension extends DefaultComponentVerifierExtension {
 
@@ -99,47 +97,48 @@ final class HttpComponentVerifierExtension extends DefaultComponentVerifierExten
                             .build());
         }
 
-        try {
-            CloseableHttpClient httpclient = createHttpClient(verifyParams);
-            HttpUriRequest request = new HttpGet(httpUri);
-
-            try (CloseableHttpResponse response = httpclient.execute(request)) {
-                int code = response.getStatusLine().getStatusCode();
-                String okCodes = getOption(verifyParams, "okStatusCodeRange", String.class).orElse("200-299");
-
-                if (!HttpHelper.isStatusCodeOk(code, okCodes)) {
-                    if (code == 401) {
-                        // Unauthorized, add authUsername and authPassword to the list
-                        // of parameters in error
-                        builder.error(
-                                ResultErrorBuilder.withHttpCode(code)
-                                        .description(response.getStatusLine().getReasonPhrase())
-                                        .parameterKey("authUsername")
-                                        .parameterKey("authPassword")
-                                        .build());
-                    } else if (code >= 300 && code < 400) {
-                        // redirect
-                        builder.error(
-                                ResultErrorBuilder.withHttpCode(code)
-                                        .description(response.getStatusLine().getReasonPhrase())
-                                        .parameterKey("httpUri")
-                                        .detail(VerificationError.HttpAttribute.HTTP_REDIRECT,
-                                                () -> HttpUtil.responseHeaderValue(response, "location"))
-                                        .build());
-                    } else if (code >= 400) {
-                        // generic http error
-                        builder.error(
-                                ResultErrorBuilder.withHttpCode(code)
-                                        .description(response.getStatusLine().getReasonPhrase())
-                                        .build());
-                    }
-                }
-            } catch (UnknownHostException e) {
-                builder.error(
-                        ResultErrorBuilder.withException(e)
-                                .parameterKey("httpUri")
-                                .build());
-            }
+        try (CloseableHttpClient httpclient = createHttpClient(verifyParams)) {
+            httpclient.execute(
+                    new HttpGet(httpUri),
+                    response -> {
+                        int code = response.getCode();
+                        String okCodes = getOption(verifyParams, "okStatusCodeRange", String.class).orElse("200-299");
+
+                        if (!HttpHelper.isStatusCodeOk(code, okCodes)) {
+                            if (code == 401) {
+                                // Unauthorized, add authUsername and authPassword to the list
+                                // of parameters in error
+                                builder.error(
+                                        ResultErrorBuilder.withHttpCode(code)
+                                                .description(response.getReasonPhrase())
+                                                .parameterKey("authUsername")
+                                                .parameterKey("authPassword")
+                                                .build());
+                            } else if (code >= 300 && code < 400) {
+                                // redirect
+                                builder.error(
+                                        ResultErrorBuilder.withHttpCode(code)
+                                                .description(response.getReasonPhrase())
+                                                .parameterKey("httpUri")
+                                                .detail(VerificationError.HttpAttribute.HTTP_REDIRECT,
+                                                        () -> HttpUtil.responseHeaderValue(response, "location"))
+                                                .build());
+                            } else if (code >= 400) {
+                                // generic http error
+                                builder.error(
+                                        ResultErrorBuilder.withHttpCode(code)
+                                                .description(response.getReasonPhrase())
+                                                .build());
+                            }
+                        }
+                        return null;
+                    });
+
+        } catch (UnknownHostException e) {
+            builder.error(
+                    ResultErrorBuilder.withException(e)
+                            .parameterKey("httpUri")
+                            .build());
         } catch (Exception e) {
             builder.error(ResultErrorBuilder.withException(e).build());
         }
@@ -201,7 +200,7 @@ final class HttpComponentVerifierExtension extends DefaultComponentVerifierExten
             Optional<String> proxyAuthDomain = getOption(parameters, "proxyAuthDomain", String.class);
             Optional<String> proxyAuthNtHost = getOption(parameters, "proxyAuthNtHost", String.class);
 
-            if (!proxyAuthScheme.isPresent()) {
+            if (proxyAuthScheme.isEmpty()) {
                 proxyAuthScheme = Optional.of(HttpHelper.isSecureConnection(uri.get()) ? "https" : "http");
             }
 
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpConstants.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpConstants.java
index fe0a9fdfe8e..9bfe6d433dc 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpConstants.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpConstants.java
@@ -18,11 +18,13 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.spi.Metadata;
-import org.apache.http.HttpHeaders;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.HttpHeaders;
 
 public final class HttpConstants {
 
     public static final String CONTENT_TYPE_JAVA_SERIALIZED_OBJECT = "application/x-java-serialized-object";
+    public static final ContentType JAVA_SERIALIZED_OBJECT = ContentType.create(CONTENT_TYPE_JAVA_SERIALIZED_OBJECT);
     public static final String CONTENT_TYPE_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded";
 
     @Metadata(description = "The HTTP content encoding. Is set on both the IN and OUT message to\n" +
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpDeleteWithBodyMethod.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpConverters.java
similarity index 50%
rename from components/camel-http/src/main/java/org/apache/camel/component/http/HttpDeleteWithBodyMethod.java
rename to components/camel-http/src/main/java/org/apache/camel/component/http/HttpConverters.java
index 5c30f353bf8..a26106e3799 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpDeleteWithBodyMethod.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpConverters.java
@@ -16,27 +16,37 @@
  */
 package org.apache.camel.component.http;
 
-import java.net.URI;
+import org.apache.camel.Converter;
+import org.apache.hc.core5.util.TimeValue;
+import org.apache.hc.core5.util.Timeout;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+/**
+ * Some converter methods to build different types used to configure the component.
+ */
+@Converter(generateLoader = true)
+public final class HttpConverters {
 
-public class HttpDeleteWithBodyMethod extends HttpEntityEnclosingRequestBase {
+    private HttpConverters() {
+        // Helper class
+    }
 
-    public static final String METHOD_NAME = "DELETE";
+    @Converter
+    public static Timeout toTimeout(long millis) {
+        return Timeout.ofMilliseconds(millis);
+    }
 
-    public HttpDeleteWithBodyMethod(String uri, HttpEntity entity) {
-        setURI(URI.create(uri));
-        setEntity(entity);
+    @Converter
+    public static Timeout toTimeout(String millis) {
+        return Timeout.ofMilliseconds(Long.parseLong(millis));
     }
 
-    public HttpDeleteWithBodyMethod(URI uri, HttpEntity entity) {
-        setURI(uri);
-        setEntity(entity);
+    @Converter
+    public static TimeValue toTimeValue(long millis) {
+        return TimeValue.ofMilliseconds(millis);
     }
 
-    @Override
-    public String getMethod() {
-        return METHOD_NAME;
+    @Converter
+    public static TimeValue toTimeValue(String millis) {
+        return TimeValue.ofMilliseconds(Long.parseLong(millis));
     }
 }
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpCredentialsHelper.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpCredentialsHelper.java
index 23270b78ca1..f51163f93b5 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpCredentialsHelper.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpCredentialsHelper.java
@@ -18,14 +18,15 @@ package org.apache.camel.component.http;
 
 import java.util.Objects;
 
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.Credentials;
-import org.apache.http.client.CredentialsProvider;
-import org.apache.http.impl.client.BasicCredentialsProvider;
+import org.apache.hc.client5.http.auth.AuthScope;
+import org.apache.hc.client5.http.auth.Credentials;
+import org.apache.hc.client5.http.auth.CredentialsProvider;
+import org.apache.hc.client5.http.auth.CredentialsStore;
+import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider;
 
 final class HttpCredentialsHelper {
 
-    private final CredentialsProvider credentialsProvider;
+    private final CredentialsStore credentialsProvider;
 
     HttpCredentialsHelper() {
         this.credentialsProvider = new BasicCredentialsProvider();
@@ -35,7 +36,7 @@ final class HttpCredentialsHelper {
             String host, Integer port, Credentials credentials) {
         this.credentialsProvider.setCredentials(new AuthScope(
                 host,
-                Objects.requireNonNullElse(port, AuthScope.ANY_PORT)), credentials);
+                Objects.requireNonNullElse(port, -1)), credentials);
         return credentialsProvider;
     }
 
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
index 5fa70271c7d..bdf448ae8b2 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
@@ -39,23 +39,23 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.http.HttpHost;
-import org.apache.http.client.CookieStore;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.conn.HttpClientConnectionManager;
-import org.apache.http.conn.ssl.DefaultHostnameVerifier;
-import org.apache.http.impl.client.BasicCookieStore;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.impl.client.LaxRedirectStrategy;
-import org.apache.http.pool.ConnPoolControl;
-import org.apache.http.pool.PoolStats;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.client5.http.classic.HttpClient;
+import org.apache.hc.client5.http.config.RequestConfig;
+import org.apache.hc.client5.http.cookie.BasicCookieStore;
+import org.apache.hc.client5.http.cookie.CookieStore;
+import org.apache.hc.client5.http.impl.DefaultRedirectStrategy;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.client5.http.io.HttpClientConnectionManager;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.pool.ConnPoolControl;
+import org.apache.hc.core5.pool.PoolStats;
+import org.apache.hc.core5.util.Timeout;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Send requests to external HTTP servers using Apache HTTP Client 4.x.
+ * Send requests to external HTTP servers using Apache HTTP Client 5.x.
  */
 @UriEndpoint(firstVersion = "2.3.0", scheme = "http,https", title = "HTTP,HTTPS", syntax = "http://httpUri",
              producerOnly = true, category = { Category.HTTP }, lenientProperties = true, headersClass = HttpConstants.class)
@@ -78,6 +78,9 @@ public class HttpEndpoint extends HttpCommonEndpoint {
     @UriParam(label = "advanced", prefix = "httpClient.", multiValue = true,
               description = "To configure the HttpClient using the key/values from the Map.")
     private Map<String, Object> httpClientOptions;
+    @UriParam(label = "advanced", prefix = "httpConnection.", multiValue = true,
+              description = "To configure the connection and the socket using the key/values from the Map.")
+    private Map<String, Object> httpConnectionOptions;
     @UriParam(label = "advanced", description = "To use a custom HttpClientConnectionManager to manage connections")
     private HttpClientConnectionManager clientConnectionManager;
     @UriParam(label = "advanced",
@@ -90,27 +93,33 @@ public class HttpEndpoint extends HttpCommonEndpoint {
     private boolean useSystemProperties;
 
     // timeout
-    @Metadata(label = "timeout", defaultValue = "-1",
-              description = "The timeout in milliseconds used when requesting a connection"
-                            + " from the connection manager. A timeout value of zero is interpreted as an infinite timeout."
-                            + " A timeout value of zero is interpreted as an infinite timeout."
-                            + " A negative value is interpreted as undefined (system default).",
-              javaType = "java.time.Duration")
-    private long connectionRequestTimeout = -1;
-    @Metadata(label = "timeout", defaultValue = "-1",
-              description = "Determines the timeout in milliseconds until a connection is established."
-                            + " A timeout value of zero is interpreted as an infinite timeout."
-                            + " A timeout value of zero is interpreted as an infinite timeout."
-                            + " A negative value is interpreted as undefined (system default).",
-              javaType = "java.time.Duration")
-    private long connectTimeout = -1;
-    @Metadata(label = "timeout", defaultValue = "-1", description = "Defines the socket timeout in milliseconds,"
-                                                                    + " which is the timeout for waiting for data  or, put differently,"
-                                                                    + " a maximum period inactivity between two consecutive data packets)."
-                                                                    + " A timeout value of zero is interpreted as an infinite timeout."
-                                                                    + " A negative value is interpreted as undefined (system default).",
-              javaType = "java.time.Duration")
-    private long socketTimeout = -1;
+    @Metadata(label = "timeout", defaultValue = "3 minutes",
+              description = "Returns the connection lease request timeout used when requesting"
+                            + " a connection from the connection manager."
+                            + " A timeout value of zero is interpreted as a disabled timeout.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    private Timeout connectionRequestTimeout = Timeout.ofMinutes(3);
+    @Metadata(label = "timeout", defaultValue = "3 minutes",
+              description = "Determines the timeout until a new connection is fully established."
+                            + " A timeout value of zero is interpreted as an infinite timeout.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    private Timeout connectTimeout = Timeout.ofMinutes(3);
+    @Metadata(label = "timeout", defaultValue = "null (undefined)",
+              description = "Determines the default socket timeout value for I/O operations.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    private Timeout socketTimeout;
+    @Metadata(label = "timeout", defaultValue = "3 minutes",
+              description = "Determines the default socket timeout value for blocking I/O operations.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    private Timeout soTimeout = Timeout.ofMinutes(3);
+    @Metadata(label = "timeout", defaultValue = "0",
+              description = "Determines the timeout until arrival of a response from the opposite"
+                            + " endpoint. A timeout value of zero is interpreted as an infinite timeout."
+                            + " Please note that response timeout may be unsupported by HTTP transports "
+                            + "with message multiplexing.",
+              javaType = "org.apache.hc.core5.util.Timeout")
+    private Timeout responseTimeout = Timeout.ofMilliseconds(0);
+
     @UriParam(label = "producer,advanced", description = "To use a custom CookieStore."
                                                          + " By default the BasicCookieStore is used which is an in-memory only cookie store."
                                                          + " Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie store as cookie shouldn't be stored as we are just bridging (eg acting as a proxy)."
@@ -167,13 +176,13 @@ public class HttpEndpoint extends HttpCommonEndpoint {
     }
 
     public HttpEndpoint(String endPointURI, HttpComponent component, URI httpURI,
-                        HttpClientConnectionManager clientConnectionManager) throws URISyntaxException {
+                        HttpClientConnectionManager clientConnectionManager) {
         this(endPointURI, component, httpURI, HttpClientBuilder.create(), clientConnectionManager, null);
     }
 
     public HttpEndpoint(String endPointURI, HttpComponent component, HttpClientBuilder clientBuilder,
                         HttpClientConnectionManager clientConnectionManager,
-                        HttpClientConfigurer clientConfigurer) throws URISyntaxException {
+                        HttpClientConfigurer clientConfigurer) {
         this(endPointURI, component, null, clientBuilder, clientConnectionManager, clientConfigurer);
     }
 
@@ -248,7 +257,7 @@ public class HttpEndpoint extends HttpCommonEndpoint {
                 LOG.debug(
                         "CamelContext properties http.proxyHost, http.proxyPort, and http.proxyScheme detected. Using http proxy host: {} port: {} scheme: {}",
                         host, port, scheme);
-                HttpHost proxy = new HttpHost(host, port, scheme);
+                HttpHost proxy = new HttpHost(scheme, host, port);
                 clientBuilder.setProxy(proxy);
             }
         } else {
@@ -256,8 +265,8 @@ public class HttpEndpoint extends HttpCommonEndpoint {
         }
 
         if (isAuthenticationPreemptive()) {
-            // setup the PreemptiveAuthInterceptor here
-            clientBuilder.addInterceptorFirst(new PreemptiveAuthInterceptor());
+            // setup the preemptive authentication here
+            clientBuilder.addExecInterceptorFirst("preemptive-auth", new PreemptiveAuthExecChainHandler());
         }
         String userAgent = getUserAgent();
         if (userAgent != null) {
@@ -275,7 +284,7 @@ public class HttpEndpoint extends HttpCommonEndpoint {
         }
 
         if (isFollowRedirects()) {
-            clientBuilder.setRedirectStrategy(new LaxRedirectStrategy());
+            clientBuilder.setRedirectStrategy(DefaultRedirectStrategy.INSTANCE);
         }
 
         LOG.debug("Setup the HttpClientBuilder {}", clientBuilder);
@@ -291,10 +300,10 @@ public class HttpEndpoint extends HttpCommonEndpoint {
     protected void doStop() throws Exception {
         if (getComponent() != null && getComponent().getClientConnectionManager() != clientConnectionManager) {
             // need to shutdown the ConnectionManager
-            clientConnectionManager.shutdown();
+            clientConnectionManager.close();
         }
-        if (httpClient instanceof Closeable) {
-            IOHelper.close((Closeable) httpClient);
+        if (httpClient instanceof Closeable closeable) {
+            IOHelper.close(closeable);
         }
     }
 
@@ -431,6 +440,17 @@ public class HttpEndpoint extends HttpCommonEndpoint {
         this.httpClientOptions = httpClientOptions;
     }
 
+    public Map<String, Object> getHttpConnectionOptions() {
+        return httpConnectionOptions;
+    }
+
+    /**
+     * To configure the connection and the socket using the key/values from the Map.
+     */
+    public void setHttpConnectionOptions(Map<String, Object> httpConnectionOptions) {
+        this.httpConnectionOptions = httpConnectionOptions;
+    }
+
     public boolean isUseSystemProperties() {
         return useSystemProperties;
     }
@@ -469,8 +489,8 @@ public class HttpEndpoint extends HttpCommonEndpoint {
     }
 
     /**
-     * To use a custom X509HostnameVerifier such as {@link DefaultHostnameVerifier} or
-     * {@link org.apache.http.conn.ssl.NoopHostnameVerifier}.
+     * To use a custom X509HostnameVerifier such as {@link org.apache.hc.client5.http.ssl.DefaultHostnameVerifier} or
+     * {@link org.apache.hc.client5.http.ssl.NoopHostnameVerifier}.
      */
     public void setX509HostnameVerifier(HostnameVerifier x509HostnameVerifier) {
         this.x509HostnameVerifier = x509HostnameVerifier;
@@ -489,61 +509,87 @@ public class HttpEndpoint extends HttpCommonEndpoint {
         this.sslContextParameters = sslContextParameters;
     }
 
-    public long getConnectionRequestTimeout() {
+    public Timeout getConnectionRequestTimeout() {
         return connectionRequestTimeout;
     }
 
     /**
-     * The timeout in milliseconds used when requesting a connection from the connection manager. A timeout value of
-     * zero is interpreted as an infinite timeout.
+     * Returns the connection lease request timeout used when requesting a connection from the connection manager.
      * <p>
-     * A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined
-     * (system default).
+     * A timeout value of zero is interpreted as a disabled timeout.
      * </p>
      * <p>
-     * Default: {@code -1}
+     * Default: 3 minutes
      * </p>
      */
-    public void setConnectionRequestTimeout(long connectionRequestTimeout) {
+    public void setConnectionRequestTimeout(Timeout connectionRequestTimeout) {
         this.connectionRequestTimeout = connectionRequestTimeout;
     }
 
-    public long getConnectTimeout() {
+    public Timeout getConnectTimeout() {
         return connectTimeout;
     }
 
     /**
-     * Determines the timeout in milliseconds until a connection is established. A timeout value of zero is interpreted
-     * as an infinite timeout.
+     * Determines the timeout until a new connection is fully established. This may also include transport security
+     * negotiation exchanges such as {@code SSL} or {@code TLS} protocol negotiation).
      * <p>
-     * A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined
-     * (system default).
+     * A timeout value of zero is interpreted as an infinite timeout.
      * </p>
      * <p>
-     * Default: {@code -1}
+     * Default: 3 minutes
      * </p>
      */
-    public void setConnectTimeout(long connectTimeout) {
+    public void setConnectTimeout(Timeout connectTimeout) {
         this.connectTimeout = connectTimeout;
     }
 
-    public long getSocketTimeout() {
+    public Timeout getSocketTimeout() {
         return socketTimeout;
     }
 
     /**
-     * Defines the socket timeout ({@code SO_TIMEOUT}) in milliseconds, which is the timeout for waiting for data or,
-     * put differently, a maximum period inactivity between two consecutive data packets).
+     * Determines the default socket timeout value for I/O operations.
+     * <p>
+     * Default: {@code null} (undefined)
+     * </p>
+     */
+    public void setSocketTimeout(Timeout socketTimeout) {
+        this.socketTimeout = socketTimeout;
+    }
+
+    public Timeout getSoTimeout() {
+        return soTimeout;
+    }
+
+    /**
+     * Determines the default socket timeout value for blocking I/O operations.
+     * <p>
+     * Default: 3 minutes
+     * </p>
+     */
+    public void setSoTimeout(Timeout soTimeout) {
+        this.soTimeout = soTimeout;
+    }
+
+    public Timeout getResponseTimeout() {
+        return responseTimeout;
+    }
+
+    /**
+     * Determines the timeout until arrival of a response from the opposite endpoint.
      * <p>
-     * A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined
-     * (system default).
+     * A timeout value of zero is interpreted as an infinite timeout.
      * </p>
      * <p>
-     * Default: {@code -1}
+     * Please note that response timeout may be unsupported by HTTP transports with message multiplexing.
+     * </p>
+     * <p>
+     * Default: {@code 0}
      * </p>
      */
-    public void setSocketTimeout(long socketTimeout) {
-        this.socketTimeout = socketTimeout;
+    public void setResponseTimeout(Timeout responseTimeout) {
+        this.responseTimeout = responseTimeout;
     }
 
     /**
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEntityConverter.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEntityConverter.java
index 651c68037c1..b709dc9c928 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEntityConverter.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEntityConverter.java
@@ -24,10 +24,11 @@ import org.apache.camel.Converter;
 import org.apache.camel.Exchange;
 import org.apache.camel.support.ExchangeHelper;
 import org.apache.camel.support.GZIPHelper;
-import org.apache.http.HttpEntity;
-import org.apache.http.entity.AbstractHttpEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.InputStreamEntity;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.io.entity.AbstractHttpEntity;
+import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
+import org.apache.hc.core5.http.io.entity.InputStreamEntity;
 
 /**
  * Some converter methods to make it easier to convert the body to RequestEntity types.
@@ -60,26 +61,27 @@ public final class HttpEntityConverter {
     }
 
     private static HttpEntity asHttpEntity(InputStream in, Exchange exchange) throws IOException {
+        String contentEncoding = null;
+        ContentType contentType = null;
+        if (exchange != null) {
+            contentEncoding = exchange.getIn().getHeader(HttpConstants.CONTENT_ENCODING, String.class);
+            String contentTypeAsString = ExchangeHelper.getContentType(exchange);
+            if (contentTypeAsString != null) {
+                contentType = ContentType.parse(contentTypeAsString);
+            }
+        }
+
         InputStreamEntity entity;
         if (exchange != null && !exchange.getProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.FALSE, Boolean.class)) {
-            String contentEncoding = exchange.getIn().getHeader(HttpConstants.CONTENT_ENCODING, String.class);
             InputStream stream = GZIPHelper.compressGzip(contentEncoding, in);
+            int available = stream.available();
             entity = new InputStreamEntity(
-                    stream, stream instanceof ByteArrayInputStream
-                            ? stream.available() != 0 ? stream.available() : -1 : -1);
+                    stream, stream instanceof ByteArrayInputStream ? available != 0 ? available : -1 : -1, contentType,
+                    contentEncoding);
         } else {
-            entity = new InputStreamEntity(in, -1);
-        }
-        if (exchange != null) {
-            String contentEncoding = exchange.getIn().getHeader(HttpConstants.CONTENT_ENCODING, String.class);
-            if (contentEncoding != null) {
-                entity.setContentEncoding(contentEncoding);
-            }
-            String contentType = ExchangeHelper.getContentType(exchange);
-            if (contentType != null) {
-                entity.setContentType(contentType);
-            }
+            entity = new InputStreamEntity(in, -1, contentType, contentEncoding);
         }
+
         return entity;
     }
 
@@ -87,33 +89,31 @@ public final class HttpEntityConverter {
         AbstractHttpEntity entity;
 
         String contentEncoding = null;
+        ContentType contentType = null;
         if (exchange != null) {
             contentEncoding = exchange.getIn().getHeader(HttpConstants.CONTENT_ENCODING, String.class);
+            String contentTypeAsString = ExchangeHelper.getContentType(exchange);
+            if (contentTypeAsString != null) {
+                contentType = ContentType.parse(contentTypeAsString);
+            }
         }
 
         if (exchange != null && !exchange.getProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.FALSE, Boolean.class)) {
             boolean gzip = GZIPHelper.isGzip(contentEncoding);
             if (gzip) {
                 InputStream stream = GZIPHelper.compressGzip(contentEncoding, data);
+                int available = stream.available();
                 entity = new InputStreamEntity(
                         stream, stream instanceof ByteArrayInputStream
-                                ? stream.available() != 0 ? stream.available() : -1 : -1);
+                                ? available != 0 ? available : -1 : -1,
+                        contentType, contentEncoding);
             } else {
                 // use a byte array entity as-is
-                entity = new ByteArrayEntity(data);
+                entity = new ByteArrayEntity(data, contentType, contentEncoding);
             }
         } else {
             // create the Repeatable HttpEntity
-            entity = new ByteArrayEntity(data);
-        }
-        if (exchange != null) {
-            if (contentEncoding != null) {
-                entity.setContentEncoding(contentEncoding);
-            }
-            String contentType = ExchangeHelper.getContentType(exchange);
-            if (contentType != null) {
-                entity.setContentType(contentType);
-            }
+            entity = new ByteArrayEntity(data, contentType, contentEncoding);
         }
         return entity;
     }
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMethods.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMethods.java
index 22fff8a464f..b2f847d0136 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMethods.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMethods.java
@@ -21,78 +21,57 @@ import java.net.URI;
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.builder.ExpressionBuilder;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpHead;
-import org.apache.http.client.methods.HttpOptions;
-import org.apache.http.client.methods.HttpPatch;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpPut;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.methods.HttpTrace;
+import org.apache.hc.client5.http.classic.methods.HttpDelete;
+import org.apache.hc.client5.http.classic.methods.HttpGet;
+import org.apache.hc.client5.http.classic.methods.HttpHead;
+import org.apache.hc.client5.http.classic.methods.HttpOptions;
+import org.apache.hc.client5.http.classic.methods.HttpPatch;
+import org.apache.hc.client5.http.classic.methods.HttpPost;
+import org.apache.hc.client5.http.classic.methods.HttpPut;
+import org.apache.hc.client5.http.classic.methods.HttpTrace;
+import org.apache.hc.client5.http.classic.methods.HttpUriRequest;
 
 public enum HttpMethods implements Expression {
 
-    GET(HttpGet.class),
-    PATCH(HttpPatch.class),
-    POST(HttpPost.class),
-    PUT(HttpPut.class),
-    DELETE(HttpDelete.class),
-    HEAD(HttpHead.class),
-    OPTIONS(HttpOptions.class),
-    TRACE(HttpTrace.class);
+    GET(false),
+    PATCH(true),
+    POST(true),
+    PUT(true),
+    DELETE(false),
+    HEAD(false),
+    OPTIONS(false),
+    TRACE(false);
 
     final boolean entity;
 
-    HttpMethods(Class<? extends HttpRequestBase> clazz) {
-        entity = HttpEntityEnclosingRequestBase.class.isAssignableFrom(clazz);
+    HttpMethods(boolean entity) {
+        this.entity = entity;
     }
 
-    public HttpRequestBase createMethod(final String url) {
-        switch (this) {
-            case GET:
-                return new HttpGet(url);
-            case PATCH:
-                return new HttpPatch(url);
-            case POST:
-                return new HttpPost(url);
-            case PUT:
-                return new HttpPut(url);
-            case DELETE:
-                return new HttpDelete(url);
-            case HEAD:
-                return new HttpHead(url);
-            case OPTIONS:
-                return new HttpOptions(url);
-            case TRACE:
-                return new HttpTrace(url);
-            default:
-                throw new RuntimeException("no such method " + this);
-        }
+    public HttpUriRequest createMethod(final String url) {
+        return switch (this) {
+            case GET -> new HttpGet(url);
+            case PATCH -> new HttpPatch(url);
+            case POST -> new HttpPost(url);
+            case PUT -> new HttpPut(url);
+            case DELETE -> new HttpDelete(url);
+            case HEAD -> new HttpHead(url);
+            case OPTIONS -> new HttpOptions(url);
+            case TRACE -> new HttpTrace(url);
+        };
     }
 
-    public HttpRequestBase createMethod(final URI uri) {
-        switch (this) {
-            case GET:
-                return new HttpGet(uri);
-            case PATCH:
-                return new HttpPatch(uri);
-            case POST:
-                return new HttpPost(uri);
-            case PUT:
-                return new HttpPut(uri);
-            case DELETE:
-                return new HttpDelete(uri);
-            case HEAD:
-                return new HttpHead(uri);
-            case OPTIONS:
-                return new HttpOptions(uri);
-            case TRACE:
-                return new HttpTrace(uri);
-            default:
-                throw new RuntimeException("no such method " + this);
-        }
+    public HttpUriRequest createMethod(final URI uri) {
+        return switch (this) {
+            case GET -> new HttpGet(uri);
+            case PATCH -> new HttpPatch(uri);
+            case POST -> new HttpPost(uri);
+            case PUT -> new HttpPut(uri);
+            case DELETE -> new HttpDelete(uri);
+            case HEAD -> new HttpHead(uri);
+            case OPTIONS -> new HttpOptions(uri);
+            case TRACE -> new HttpTrace(uri);
+        };
     }
 
     public final boolean isEntityEnclosing() {
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java
index 805bca01a24..1c3e92caffb 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.http;
 
 import java.io.IOException;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
@@ -24,17 +25,16 @@ import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.http.common.HttpHelper;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.support.PollingConsumerSupport;
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.protocol.HttpClientContext;
-import org.apache.http.impl.auth.BasicScheme;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.util.EntityUtils;
+import org.apache.hc.client5.http.classic.HttpClient;
+import org.apache.hc.client5.http.classic.methods.HttpGet;
+import org.apache.hc.client5.http.classic.methods.HttpUriRequest;
+import org.apache.hc.client5.http.config.RequestConfig;
+import org.apache.hc.client5.http.protocol.HttpClientContext;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.io.HttpClientResponseHandler;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 /**
  * A polling HTTP consumer which by default performs a GET
@@ -42,7 +42,7 @@ import org.apache.http.util.EntityUtils;
 public class HttpPollingConsumer extends PollingConsumerSupport {
     private final HttpEndpoint endpoint;
     private HttpClient httpClient;
-    private HttpContext httpContext;
+    private final HttpContext httpContext;
 
     public HttpPollingConsumer(HttpEndpoint endpoint) {
         super(endpoint);
@@ -73,45 +73,49 @@ public class HttpPollingConsumer extends PollingConsumerSupport {
 
     protected Exchange doReceive(int timeout) {
         Exchange exchange = endpoint.createExchange();
-        HttpRequestBase method = createMethod(exchange);
+        HttpUriRequest method = createMethod(exchange);
         HttpClientContext httpClientContext = new HttpClientContext();
 
         // set optional timeout in millis
         if (timeout > 0) {
-            RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(timeout).build();
+            RequestConfig requestConfig = RequestConfig.custom().setResponseTimeout(timeout, TimeUnit.MILLISECONDS).build();
             httpClientContext.setRequestConfig(requestConfig);
         }
 
         HttpEntity responseEntity = null;
         try {
             // execute request
-            HttpResponse response = executeMethod(method, httpClientContext);
-            int responseCode = response.getStatusLine().getStatusCode();
-            responseEntity = response.getEntity();
-            Object body = HttpHelper.cacheResponseBodyFromInputStream(responseEntity.getContent(), exchange);
-
-            // lets store the result in the output message.
-            Message message = exchange.getMessage();
-            message.setBody(body);
-
-            // lets set the headers
-            Header[] headers = response.getAllHeaders();
-            HeaderFilterStrategy strategy = endpoint.getHeaderFilterStrategy();
-            for (Header header : headers) {
-                String name = header.getName();
-                // mapping the content-type
-                if (name.equalsIgnoreCase("content-type")) {
-                    name = Exchange.CONTENT_TYPE;
-                }
-                String value = header.getValue();
-                if (strategy != null && !strategy.applyFilterToExternalHeaders(name, value, exchange)) {
-                    message.setHeader(name, value);
-                }
-            }
-            message.setHeader(HttpConstants.HTTP_RESPONSE_CODE, responseCode);
-            if (response.getStatusLine() != null) {
-                message.setHeader(HttpConstants.HTTP_RESPONSE_TEXT, response.getStatusLine().getReasonPhrase());
-            }
+            responseEntity = executeMethod(
+                    method, httpClientContext,
+                    response -> {
+                        int responseCode = response.getCode();
+                        HttpEntity entity = response.getEntity();
+                        Object body = HttpHelper.cacheResponseBodyFromInputStream(entity.getContent(), exchange);
+
+                        // lets store the result in the output message.
+                        Message message = exchange.getMessage();
+                        message.setBody(body);
+
+                        // lets set the headers
+                        Header[] headers = response.getHeaders();
+                        HeaderFilterStrategy strategy = endpoint.getHeaderFilterStrategy();
+                        for (Header header : headers) {
+                            String name = header.getName();
+                            // mapping the content-type
+                            if (name.equalsIgnoreCase("content-type")) {
+                                name = Exchange.CONTENT_TYPE;
+                            }
+                            String value = header.getValue();
+                            if (strategy != null && !strategy.applyFilterToExternalHeaders(name, value, exchange)) {
+                                message.setHeader(name, value);
+                            }
+                        }
+                        message.setHeader(HttpConstants.HTTP_RESPONSE_CODE, responseCode);
+                        if (response.getReasonPhrase() != null) {
+                            message.setHeader(HttpConstants.HTTP_RESPONSE_TEXT, response.getReasonPhrase());
+                        }
+                        return entity;
+                    });
 
             return exchange;
         } catch (IOException e) {
@@ -134,16 +138,13 @@ public class HttpPollingConsumer extends PollingConsumerSupport {
      * @return             the response
      * @throws IOException can be thrown
      */
-    protected HttpResponse executeMethod(HttpRequestBase httpRequest, HttpClientContext httpClientContext) throws IOException {
-
-        if (getEndpoint().isAuthenticationPreemptive()) {
-            BasicScheme basicAuth = new BasicScheme();
-            httpClientContext.setAttribute("preemptive-auth", basicAuth);
-        }
+    protected <T> T executeMethod(
+            HttpUriRequest httpRequest, HttpClientContext httpClientContext, HttpClientResponseHandler<T> handler)
+            throws IOException {
         if (httpContext != null) {
             httpClientContext = new HttpClientContext(httpContext);
         }
-        return httpClient.execute(httpRequest, httpClientContext);
+        return httpClient.execute(httpRequest, httpClientContext, handler);
     }
 
     // Properties
@@ -160,7 +161,7 @@ public class HttpPollingConsumer extends PollingConsumerSupport {
     // Implementation methods
     //-------------------------------------------------------------------------
 
-    protected HttpRequestBase createMethod(Exchange exchange) {
+    protected HttpUriRequest createMethod(Exchange exchange) {
         String uri = HttpHelper.createURL(exchange, endpoint);
         return new HttpGet(uri);
     }
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index cad827fc62d..0c9eb99ab75 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -25,6 +25,7 @@ import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.charset.Charset;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -38,11 +39,13 @@ import org.apache.camel.CamelExchangeException;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePropertyKey;
 import org.apache.camel.Message;
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.TypeConverter;
 import org.apache.camel.component.file.GenericFile;
 import org.apache.camel.component.http.helper.HttpMethodHelper;
 import org.apache.camel.converter.stream.CachedOutputStream;
 import org.apache.camel.http.base.HttpOperationFailedException;
+import org.apache.camel.http.base.cookie.CookieHandler;
 import org.apache.camel.http.common.HttpHelper;
 import org.apache.camel.http.common.HttpProtocolHeaderFilterStrategy;
 import org.apache.camel.spi.HeaderFilterStrategy;
@@ -56,27 +59,26 @@ import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.URISupport;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
-import org.apache.http.Header;
-import org.apache.http.HeaderIterator;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpVersion;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.utils.URIUtils;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.FileEntity;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.auth.BasicScheme;
-import org.apache.http.protocol.BasicHttpContext;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.util.EntityUtils;
+import org.apache.hc.client5.http.classic.HttpClient;
+import org.apache.hc.client5.http.classic.methods.HttpUriRequest;
+import org.apache.hc.client5.http.protocol.HttpClientContext;
+import org.apache.hc.client5.http.utils.URIUtils;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElements;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.io.HttpClientResponseHandler;
+import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.http.io.entity.FileEntity;
+import org.apache.hc.core5.http.io.entity.InputStreamEntity;
+import org.apache.hc.core5.http.io.entity.StringEntity;
+import org.apache.hc.core5.http.protocol.BasicHttpContext;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -143,7 +145,7 @@ public class HttpProducer extends DefaultProducer {
         boolean cookies = !getEndpoint().getComponent().isCookieManagementDisabled();
         if (cookies && getEndpoint().isClearExpiredCookies() && !getEndpoint().isBridgeEndpoint()) {
             // create the cookies before the invocation
-            getEndpoint().getCookieStore().clearExpired(new Date());
+            getEndpoint().getCookieStore().clearExpired(Instant.now());
         }
 
         // if we bridge endpoint then we need to skip matching headers with the HTTP_QUERY to avoid sending
@@ -158,7 +160,7 @@ public class HttpProducer extends DefaultProducer {
             }
         }
 
-        HttpRequestBase httpRequest = createMethod(exchange);
+        HttpUriRequest httpRequest = createMethod(exchange);
         HttpHost httpHost = createHost(httpRequest);
 
         Message in = exchange.getIn();
@@ -166,7 +168,7 @@ public class HttpProducer extends DefaultProducer {
         if (httpProtocolVersion != null) {
             // set the HTTP protocol version
             int[] version = HttpHelper.parserHttpVersion(httpProtocolVersion);
-            httpRequest.setProtocolVersion(new HttpVersion(version[0], version[1]));
+            httpRequest.setVersion(new HttpVersion(version[0], version[1]));
         }
 
         HeaderFilterStrategy strategy = getEndpoint().getHeaderFilterStrategy();
@@ -236,7 +238,7 @@ public class HttpProducer extends DefaultProducer {
 
         if (getEndpoint().getCookieHandler() != null) {
             Map<String, List<String>> cookieHeaders
-                    = getEndpoint().getCookieHandler().loadCookies(exchange, httpRequest.getURI());
+                    = getEndpoint().getCookieHandler().loadCookies(exchange, httpRequest.getUri());
             for (Map.Entry<String, List<String>> entry : cookieHeaders.entrySet()) {
                 String key = entry.getKey();
                 if (!entry.getValue().isEmpty()) {
@@ -260,61 +262,90 @@ public class HttpProducer extends DefaultProducer {
         }
 
         if (getEndpoint().isConnectionClose()) {
-            httpRequest.addHeader("Connection", HTTP.CONN_CLOSE);
+            httpRequest.addHeader("Connection", HeaderElements.CLOSE);
         }
 
         // lets store the result in the output message.
-        HttpResponse httpResponse = null;
         try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Executing http {} method: {}", httpRequest.getMethod(), httpRequest.getURI());
-            }
-            httpResponse = executeMethod(httpHost, httpRequest);
-            int responseCode = httpResponse.getStatusLine().getStatusCode();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Http responseCode: {}", responseCode);
-            }
-
-            if (!throwException) {
-                // if we do not use failed exception then populate response for all response codes
-                populateResponse(exchange, httpRequest, httpResponse, strategy, responseCode);
-            } else {
-                boolean ok;
-                if (minOkRange > 0) {
-                    ok = responseCode >= minOkRange && responseCode <= maxOkRange;
-                } else {
-                    ok = HttpHelper.isStatusCodeOk(responseCode, getEndpoint().getOkStatusCodeRange());
-                }
-                if (ok) {
-                    // only populate response for OK response
-                    populateResponse(exchange, httpRequest, httpResponse, strategy, responseCode);
-                } else {
-                    // operation failed so populate exception to throw
-                    throw populateHttpOperationFailedException(exchange, httpRequest, httpResponse, responseCode);
-                }
-            }
-        } finally {
-            final HttpResponse response = httpResponse;
-            if (httpResponse != null && getEndpoint().isDisableStreamCache()) {
-                // close the stream at the end of the exchange to ensure it gets eventually closed later
-                exchange.getExchangeExtension().addOnCompletion(new SynchronizationAdapter() {
-                    @Override
-                    public void onDone(Exchange exchange) {
+            executeMethod(
+                    httpHost, httpRequest,
+                    httpResponse -> {
                         try {
-                            EntityUtils.consume(response.getEntity());
+                            if (LOG.isDebugEnabled()) {
+                                LOG.debug("Executing http {} method: {}", httpRequest.getMethod(), httpRequest.getUri());
+                            }
+                            int responseCode = httpResponse.getCode();
+                            if (LOG.isDebugEnabled()) {
+                                LOG.debug("Http responseCode: {}", responseCode);
+                            }
+
+                            if (!throwException) {
+                                // if we do not use failed exception then populate response for all response codes
+                                HttpProducer.this.populateResponse(exchange, httpRequest, httpResponse, strategy, responseCode);
+                            } else {
+                                boolean ok;
+                                if (minOkRange > 0) {
+                                    ok = responseCode >= minOkRange && responseCode <= maxOkRange;
+                                } else {
+                                    ok = HttpHelper.isStatusCodeOk(responseCode,
+                                            HttpProducer.this.getEndpoint().getOkStatusCodeRange());
+                                }
+                                if (ok) {
+                                    // only populate response for OK response
+                                    HttpProducer.this.populateResponse(exchange, httpRequest, httpResponse, strategy,
+                                            responseCode);
+                                } else {
+                                    // operation failed so populate exception to throw
+                                    throw HttpProducer.this.populateHttpOperationFailedException(exchange, httpRequest,
+                                            httpResponse, responseCode);
+                                }
+                            }
+                        } catch (IOException | HttpException | RuntimeCamelException e) {
+                            throw e;
                         } catch (Exception e) {
-                            // ignore
+                            throw new RuntimeCamelException(e);
+                        } finally {
+                            if (httpResponse != null && HttpProducer.this.getEndpoint().isDisableStreamCache()) {
+                                // close the stream at the end of the exchange to ensure it gets eventually closed later
+                                exchange.getExchangeExtension().addOnCompletion(new SynchronizationAdapter() {
+                                    @Override
+                                    public void onDone(Exchange exchange1) {
+                                        try {
+                                            EntityUtils.consume(httpResponse.getEntity());
+                                        } catch (Exception e) {
+                                            // ignore
+                                        } finally {
+                                            try {
+                                                EntityUtils.consume(httpRequest.getEntity());
+                                            } catch (Exception e) {
+                                                // ignore
+                                            }
+                                        }
+                                    }
+                                });
+                            } else if (httpResponse != null) {
+                                // close the stream now
+                                try {
+                                    EntityUtils.consume(httpResponse.getEntity());
+                                } catch (Exception e) {
+                                    // ignore
+                                } finally {
+                                    try {
+                                        EntityUtils.consume(httpRequest.getEntity());
+                                    } catch (Exception e) {
+                                        // ignore
+                                    }
+                                }
+                            }
                         }
-                    }
-                });
-            } else if (httpResponse != null) {
-                // close the stream now
-                try {
-                    EntityUtils.consume(response.getEntity());
-                } catch (Exception e) {
-                    // ignore
-                }
+                        return null;
+                    });
+        } catch (RuntimeCamelException e) {
+            if (e.getCause() instanceof Exception ex) {
+                // Rethrow the embedded exception to simulate the same behavior as with version 4
+                throw ex;
             }
+            throw e;
         }
     }
 
@@ -324,7 +355,7 @@ public class HttpProducer extends DefaultProducer {
     }
 
     protected void populateResponse(
-            Exchange exchange, HttpRequestBase httpRequest, HttpResponse httpResponse,
+            Exchange exchange, HttpUriRequest httpRequest, ClassicHttpResponse httpResponse,
             HeaderFilterStrategy strategy, int responseCode)
             throws IOException, ClassNotFoundException {
         // We just make the out message is not create when extractResponseBody throws exception
@@ -337,8 +368,8 @@ public class HttpProducer extends DefaultProducer {
         } else {
             answer.setHeader(HttpConstants.HTTP_RESPONSE_CODE, responseCode);
         }
-        if (httpResponse.getStatusLine() != null) {
-            answer.setHeader(HttpConstants.HTTP_RESPONSE_TEXT, httpResponse.getStatusLine().getReasonPhrase());
+        if (httpResponse.getReasonPhrase() != null) {
+            answer.setHeader(HttpConstants.HTTP_RESPONSE_TEXT, httpResponse.getReasonPhrase());
         }
         answer.setBody(response);
 
@@ -346,15 +377,16 @@ public class HttpProducer extends DefaultProducer {
 
             // propagate HTTP response headers
             Map<String, List<String>> cookieHeaders = null;
-            if (getEndpoint().getCookieHandler() != null) {
+            CookieHandler cookieHandler = getEndpoint().getCookieHandler();
+            if (cookieHandler != null) {
                 cookieHeaders = new HashMap<>();
             }
 
             // optimize to walk headers with an iterator which does not create a new array as getAllHeaders does
             boolean found = false;
-            HeaderIterator it = httpResponse.headerIterator();
+            Iterator<Header> it = httpResponse.headerIterator();
             while (it.hasNext()) {
-                Header header = it.nextHeader();
+                Header header = it.next();
                 String name = header.getName();
                 String value = header.getValue();
                 if (cookieHeaders != null) {
@@ -372,8 +404,12 @@ public class HttpProducer extends DefaultProducer {
                 }
             }
             // handle cookies
-            if (getEndpoint().getCookieHandler() != null) {
-                getEndpoint().getCookieHandler().storeCookies(exchange, httpRequest.getURI(), cookieHeaders);
+            if (cookieHandler != null) {
+                try {
+                    cookieHandler.storeCookies(exchange, httpRequest.getUri(), cookieHeaders);
+                } catch (URISyntaxException e) {
+                    throw new RuntimeCamelException(e);
+                }
             }
         }
 
@@ -386,26 +422,30 @@ public class HttpProducer extends DefaultProducer {
     }
 
     protected Exception populateHttpOperationFailedException(
-            Exchange exchange, HttpRequestBase httpRequest, HttpResponse httpResponse, int responseCode)
+            Exchange exchange, HttpUriRequest httpRequest, ClassicHttpResponse httpResponse, int responseCode)
             throws IOException, ClassNotFoundException {
         Exception answer;
 
-        String uri = httpRequest.getURI().toString();
-        String statusText = httpResponse.getStatusLine() != null ? httpResponse.getStatusLine().getReasonPhrase() : null;
-        Map<String, String> headers = extractResponseHeaders(httpResponse.getAllHeaders());
+        String statusText = httpResponse.getReasonPhrase() != null ? httpResponse.getReasonPhrase() : null;
+        Map<String, String> headers = extractResponseHeaders(httpResponse.getHeaders());
         // handle cookies
-        if (getEndpoint().getCookieHandler() != null) {
+        CookieHandler cookieHandler = getEndpoint().getCookieHandler();
+        if (cookieHandler != null) {
             Map<String, List<String>> m = new HashMap<>();
             for (Entry<String, String> e : headers.entrySet()) {
                 m.put(e.getKey(), Collections.singletonList(e.getValue()));
             }
-            getEndpoint().getCookieHandler().storeCookies(exchange, httpRequest.getURI(), m);
+            try {
+                cookieHandler.storeCookies(exchange, httpRequest.getUri(), m);
+            } catch (URISyntaxException e) {
+                throw new RuntimeCamelException(e);
+            }
         }
 
         Object responseBody = extractResponseBody(httpResponse, exchange, getEndpoint().isIgnoreResponseBody());
-        if (transferException && responseBody instanceof Exception) {
+        if (transferException && responseBody instanceof Exception ex) {
             // if the response was a serialized exception then use that
-            return (Exception) responseBody;
+            return ex;
         }
 
         // make a defensive copy of the response body in the exception so its detached from the cache
@@ -415,10 +455,16 @@ public class HttpProducer extends DefaultProducer {
         }
 
         Header locationHeader = httpResponse.getFirstHeader("location");
-        if (locationHeader != null && responseCode >= 300 && responseCode < 400) {
-            answer = new HttpOperationFailedException(uri, responseCode, statusText, locationHeader.getValue(), headers, copy);
-        } else {
-            answer = new HttpOperationFailedException(uri, responseCode, statusText, null, headers, copy);
+        try {
+            String uri = httpRequest.getUri().toString();
+            if (locationHeader != null && responseCode >= 300 && responseCode < 400) {
+                answer = new HttpOperationFailedException(
+                        uri, responseCode, statusText, locationHeader.getValue(), headers, copy);
+            } else {
+                answer = new HttpOperationFailedException(uri, responseCode, statusText, null, headers, copy);
+            }
+        } catch (URISyntaxException e) {
+            throw new RuntimeCamelException(e);
         }
 
         return answer;
@@ -429,30 +475,28 @@ public class HttpProducer extends DefaultProducer {
      *
      * @param  httpHost    the http host to call
      * @param  httpRequest the http request to execute
+     * @param  handler     the response handler
      * @return             the response
      * @throws IOException can be thrown
      */
-    protected HttpResponse executeMethod(HttpHost httpHost, HttpUriRequest httpRequest) throws IOException {
-        HttpContext localContext = new BasicHttpContext();
-        if (getEndpoint().isAuthenticationPreemptive()) {
-            BasicScheme basicAuth = new BasicScheme();
-            localContext.setAttribute("preemptive-auth", basicAuth);
-        }
+    protected <T> T executeMethod(HttpHost httpHost, HttpUriRequest httpRequest, HttpClientResponseHandler<T> handler)
+            throws IOException {
+        HttpContext localContext = HttpClientContext.create();
         if (httpContext != null) {
             localContext = new BasicHttpContext(httpContext);
         }
-        return httpClient.execute(httpHost, httpRequest, localContext);
+        return httpClient.execute(httpHost, httpRequest, localContext, handler);
     }
 
     /**
      * Extracts the response headers
      *
      * @param  responseHeaders the headers
-     * @return                 the extracted headers or <tt>null</tt> if no headers existed
+     * @return                 the extracted headers or an empty map if no headers existed
      */
     protected static Map<String, String> extractResponseHeaders(Header[] responseHeaders) {
         if (responseHeaders == null || responseHeaders.length == 0) {
-            return null;
+            return Map.of();
         }
 
         Map<String, String> answer = new HashMap<>();
@@ -467,7 +511,7 @@ public class HttpProducer extends DefaultProducer {
      * Extracts the response from the method as a InputStream.
      */
     protected Object extractResponseBody(
-            HttpResponse httpResponse, Exchange exchange, boolean ignoreResponseBody)
+            ClassicHttpResponse httpResponse, Exchange exchange, boolean ignoreResponseBody)
             throws IOException, ClassNotFoundException {
         HttpEntity entity = httpResponse.getEntity();
         if (entity == null) {
@@ -562,11 +606,15 @@ public class HttpProducer extends DefaultProducer {
     /**
      * Creates the HttpHost to use to call the remote server
      */
-    protected HttpHost createHost(HttpRequestBase httpRequest) {
-        if (httpRequest.getURI() == defaultUri) {
-            return defaultHttpHost;
-        } else {
-            return URIUtils.extractHost(httpRequest.getURI());
+    protected HttpHost createHost(HttpUriRequest httpRequest) {
+        try {
+            URI uri = httpRequest.getUri();
+            if (uri.equals(defaultUri)) {
+                return defaultHttpHost;
+            }
+            return HttpHost.create(uri);
+        } catch (URISyntaxException e) {
+            throw new RuntimeCamelException(e);
         }
     }
 
@@ -578,7 +626,7 @@ public class HttpProducer extends DefaultProducer {
      * @throws URISyntaxException is thrown if the URI is invalid
      * @throws Exception          is thrown if error creating RequestEntity
      */
-    protected HttpRequestBase createMethod(Exchange exchange) throws Exception {
+    protected HttpUriRequest createMethod(Exchange exchange) throws Exception {
         if (defaultUri == null || defaultUrl == null) {
             throw new IllegalArgumentException("Producer must be started");
         }
@@ -614,15 +662,12 @@ public class HttpProducer extends DefaultProducer {
 
         // create http holder objects for the request
         HttpMethods methodToUse = HttpMethodHelper.createMethod(exchange, getEndpoint());
-        HttpRequestBase method = methodToUse.createMethod(uri);
+        HttpUriRequest method = methodToUse.createMethod(uri);
 
         // special for HTTP DELETE/GET if the message body should be included
-        if (getEndpoint().isDeleteWithBody() && "DELETE".equals(method.getMethod())) {
-            HttpEntity requestEntity = createRequestEntity(exchange);
-            method = new HttpDeleteWithBodyMethod(uri, requestEntity);
-        } else if (getEndpoint().isGetWithBody() && "GET".equals(method.getMethod())) {
-            HttpEntity requestEntity = createRequestEntity(exchange);
-            method = new HttpGetWithBodyMethod(uri, requestEntity);
+        if (getEndpoint().isDeleteWithBody() && "DELETE".equals(method.getMethod())
+                || getEndpoint().isGetWithBody() && "GET".equals(method.getMethod())) {
+            method.setEntity(createRequestEntity(exchange));
         }
 
         LOG.trace("Using URL: {} with method: {}", url, method);
@@ -630,14 +675,14 @@ public class HttpProducer extends DefaultProducer {
         if (methodToUse.isEntityEnclosing()) {
             // only create entity for http payload if the HTTP method carries payload (such as POST)
             HttpEntity requestEntity = createRequestEntity(exchange);
-            ((HttpEntityEnclosingRequestBase) method).setEntity(requestEntity);
+            method.setEntity(requestEntity);
             if (requestEntity != null && requestEntity.getContentType() == null) {
                 LOG.debug("No Content-Type provided for URL: {} with exchange: {}", url, exchange);
             }
         }
 
         // there must be a host on the method
-        if (method.getURI().getScheme() == null || method.getURI().getHost() == null) {
+        if (uri.getScheme() == null || uri.getHost() == null) {
             throw new IllegalArgumentException(
                     "Invalid url: " + url + ". If you are forwarding/bridging http endpoints, then enable the bridgeEndpoint option on the endpoint: "
                                                + getEndpoint());
@@ -661,15 +706,15 @@ public class HttpProducer extends DefaultProducer {
         try {
             if (body == null) {
                 return null;
-            } else if (body instanceof HttpEntity) {
-                answer = (HttpEntity) body;
+            } else if (body instanceof HttpEntity entity) {
+                answer = entity;
                 // special optimized for using these 3 type converters for common message payload types
-            } else if (body instanceof byte[]) {
-                answer = HttpEntityConverter.toHttpEntity((byte[]) body, exchange);
-            } else if (body instanceof InputStream) {
-                answer = HttpEntityConverter.toHttpEntity((InputStream) body, exchange);
-            } else if (body instanceof String) {
-                answer = HttpEntityConverter.toHttpEntity((String) body, exchange);
+            } else if (body instanceof byte[] bytes) {
+                answer = HttpEntityConverter.toHttpEntity(bytes, exchange);
+            } else if (body instanceof InputStream is) {
+                answer = HttpEntityConverter.toHttpEntity(is, exchange);
+            } else if (body instanceof String content) {
+                answer = HttpEntityConverter.toHttpEntity(content, exchange);
             }
         } catch (Exception e) {
             throw new CamelExchangeException("Error creating RequestEntity from message body", exchange, e);
@@ -698,30 +743,24 @@ public class HttpProducer extends DefaultProducer {
                             && HttpConstants.CONTENT_TYPE_JAVA_SERIALIZED_OBJECT.equals(contentTypeString)) {
                         if (!getEndpoint().getComponent().isAllowJavaSerializedObject()) {
                             throw new CamelExchangeException(
-                                    "Content-type " + org.apache.camel.http.common.HttpConstants.CONTENT_TYPE_JAVA_SERIALIZED_OBJECT
+                                    "Content-type " + HttpConstants.CONTENT_TYPE_JAVA_SERIALIZED_OBJECT
                                                              + " is not allowed",
                                     exchange);
                         }
                         // serialized java object
                         Serializable obj = in.getMandatoryBody(Serializable.class);
                         // write object to output stream
-                        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-                        HttpHelper.writeObjectToStream(bos, obj);
-                        ByteArrayEntity entity = new ByteArrayEntity(bos.toByteArray());
-                        entity.setContentType(HttpConstants.CONTENT_TYPE_JAVA_SERIALIZED_OBJECT);
-                        IOHelper.close(bos);
-                        answer = entity;
+                        try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
+                            HttpHelper.writeObjectToStream(bos, obj);
+                            answer = new ByteArrayEntity(bos.toByteArray(), HttpConstants.JAVA_SERIALIZED_OBJECT);
+                        }
                     } else if (data instanceof File || data instanceof GenericFile) {
                         // file based (could potentially also be a FTP file etc)
                         File file = in.getBody(File.class);
                         if (file != null) {
-                            if (contentType != null) {
-                                answer = new FileEntity(file, contentType);
-                            } else {
-                                answer = new FileEntity(file);
-                            }
+                            answer = new FileEntity(file, contentType);
                         }
-                    } else if (data instanceof String) {
+                    } else if (data instanceof String content) {
                         // be a bit careful with String as any type can most likely be converted to String
                         // so we only do an instanceof check and accept String if the body is really a String
                         // do not fallback to use the default charset as it can influence the request
@@ -734,8 +773,14 @@ public class HttpProducer extends DefaultProducer {
                                 charset = cs.name();
                             }
                         }
-                        StringEntity entity = new StringEntity((String) data, charset);
-                        entity.setContentType(contentType != null ? contentType.toString() : null);
+                        final StringEntity entity;
+                        if (contentType != null) {
+                            entity = new StringEntity(content, contentType);
+                        } else if (charset != null) {
+                            entity = new StringEntity(content, null, charset, false);
+                        } else {
+                            entity = new StringEntity(content, null, null, false);
+                        }
                         answer = entity;
                     }
 
@@ -744,11 +789,8 @@ public class HttpProducer extends DefaultProducer {
                         // force the body as an input stream since this is the fallback
                         InputStream is = in.getMandatoryBody(InputStream.class);
 
-                        InputStreamEntity entity = new InputStreamEntity(is, -1);
+                        InputStreamEntity entity = new InputStreamEntity(is, -1, contentType);
 
-                        if (contentType != null) {
-                            entity.setContentType(contentType.toString());
-                        }
                         answer = entity;
                     }
                 }
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpUtil.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpUtil.java
index 9922e9eb2f9..212f7642429 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpUtil.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpUtil.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import java.util.Optional;
 
-import org.apache.http.Header;
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpResponse;
 
 public final class HttpUtil {
     private HttpUtil() {
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/NoopCookieStore.java b/components/camel-http/src/main/java/org/apache/camel/component/http/NoopCookieStore.java
index 759a557cf28..d9480ac3fbe 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/NoopCookieStore.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/NoopCookieStore.java
@@ -20,8 +20,8 @@ import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.http.client.CookieStore;
-import org.apache.http.cookie.Cookie;
+import org.apache.hc.client5.http.cookie.Cookie;
+import org.apache.hc.client5.http.cookie.CookieStore;
 
 /**
  * A noop {@link CookieStore} used when bridging endpoints.
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/PreemptiveAuthExecChainHandler.java b/components/camel-http/src/main/java/org/apache/camel/component/http/PreemptiveAuthExecChainHandler.java
new file mode 100644
index 00000000000..cbfe6126c94
--- /dev/null
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/PreemptiveAuthExecChainHandler.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.http;
+
+import java.io.IOException;
+
+import org.apache.hc.client5.http.auth.AuthCache;
+import org.apache.hc.client5.http.auth.AuthScope;
+import org.apache.hc.client5.http.auth.Credentials;
+import org.apache.hc.client5.http.auth.CredentialsProvider;
+import org.apache.hc.client5.http.classic.ExecChain;
+import org.apache.hc.client5.http.classic.ExecChainHandler;
+import org.apache.hc.client5.http.impl.auth.BasicAuthCache;
+import org.apache.hc.client5.http.impl.auth.BasicScheme;
+import org.apache.hc.client5.http.protocol.HttpClientContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHost;
+
+public class PreemptiveAuthExecChainHandler implements ExecChainHandler {
+
+    @Override
+    public ClassicHttpResponse execute(
+            ClassicHttpRequest request,
+            ExecChain.Scope scope,
+            ExecChain chain)
+            throws IOException, HttpException {
+
+        HttpClientContext context = scope.clientContext;
+        AuthCache authCache = context.getAuthCache();
+        // If no auth scheme available yet, try to initialize it preemptively
+        if (authCache == null) {
+            CredentialsProvider credentialsProvider = context.getCredentialsProvider();
+            HttpHost httpHost = scope.route.getTargetHost();
+            Credentials credentials = credentialsProvider.getCredentials(new AuthScope(httpHost), context);
+            if (credentials == null) {
+                throw new HttpException("No credentials for preemptive authentication");
+            }
+            BasicScheme authScheme = new BasicScheme();
+            authScheme.initPreemptive(credentials);
+            authCache = new BasicAuthCache();
+            authCache.put(httpHost, authScheme);
+            context.setAuthCache(authCache);
+        }
+        return chain.proceed(request, scope);
+    }
+}
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/PreemptiveAuthInterceptor.java b/components/camel-http/src/main/java/org/apache/camel/component/http/PreemptiveAuthInterceptor.java
deleted file mode 100644
index 4e5174987ed..00000000000
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/PreemptiveAuthInterceptor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.http;
-
-import java.io.IOException;
-
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.auth.AuthScheme;
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.AuthState;
-import org.apache.http.auth.Credentials;
-import org.apache.http.client.CredentialsProvider;
-import org.apache.http.client.protocol.HttpClientContext;
-import org.apache.http.protocol.HttpContext;
-
-public class PreemptiveAuthInterceptor implements HttpRequestInterceptor {
-
-    @Override
-    public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
-        AuthState authState = (AuthState) context.getAttribute(HttpClientContext.TARGET_AUTH_STATE);
-        // If no auth scheme avaialble yet, try to initialize it preemptively
-        if (authState.getAuthScheme() == null) {
-            AuthScheme authScheme = (AuthScheme) context.getAttribute("preemptive-auth");
-            CredentialsProvider credsProvider = (CredentialsProvider) context.getAttribute(HttpClientContext.CREDS_PROVIDER);
-            if (authScheme != null) {
-                Credentials creds = credsProvider.getCredentials(AuthScope.ANY);
-                if (creds == null) {
-                    throw new HttpException("No credentials for preemptive authentication");
-                }
-                authState.update(authScheme, creds);
-            }
-        }
-
-    }
-}
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java
index 8bf0c1bfad2..3b480d734a4 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.component.http;
 
-import org.apache.http.HttpHost;
-import org.apache.http.auth.Credentials;
-import org.apache.http.auth.NTCredentials;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.hc.client5.http.auth.Credentials;
+import org.apache.hc.client5.http.auth.NTCredentials;
+import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.core5.http.HttpHost;
 
 /**
  * Strategy for configuring the HttpClient with a proxy
@@ -31,7 +31,7 @@ public class ProxyHttpClientConfigurer implements HttpClientConfigurer {
     private final Integer port;
     private final String scheme;
     private final String username;
-    private final String password;
+    private final char[] password;
     private final String domain;
     private final String ntHost;
     private final HttpCredentialsHelper credentialsHelper;
@@ -46,7 +46,7 @@ public class ProxyHttpClientConfigurer implements HttpClientConfigurer {
         this.port = port;
         this.scheme = scheme;
         this.username = username;
-        this.password = password;
+        this.password = password == null ? new char[0] : password.toCharArray();
         this.domain = domain;
         this.ntHost = ntHost;
         this.credentialsHelper = credentialsHelper;
@@ -54,7 +54,7 @@ public class ProxyHttpClientConfigurer implements HttpClientConfigurer {
 
     @Override
     public void configureHttpClient(HttpClientBuilder clientBuilder) {
-        clientBuilder.setProxy(new HttpHost(host, port, scheme));
+        clientBuilder.setProxy(new HttpHost(scheme, host, port));
 
         if (username != null && password != null) {
             Credentials defaultcreds;
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpTest.java
index 9fdd72d3df2..0a7e3238ab8 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpTest.java
@@ -20,21 +20,21 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
-import org.apache.http.HttpStatus;
+import org.apache.hc.core5.http.HttpStatus;
 
-import static org.apache.http.HttpHeaders.CONTENT_LENGTH;
-import static org.apache.http.HttpHeaders.CONTENT_TYPE;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_LENGTH;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_TYPE;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public abstract class BaseHttpTest extends HttpServerTestSupport {
 
     protected void assertExchange(Exchange exchange) {
         assertNotNull(exchange);
-
-        assertTrue(exchange.hasOut());
+        assertNull(exchange.getException());
         Message out = exchange.getMessage();
+        assertNotNull(out);
         assertHeaders(out.getHeaders());
         assertBody(out.getBody(String.class));
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpsTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpsTest.java
index e09042f449b..1b51e3e17e7 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpsTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/BaseHttpsTest.java
@@ -20,18 +20,19 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
-import org.apache.http.HttpStatus;
+import org.apache.hc.core5.http.HttpStatus;
 
-import static org.apache.http.HttpHeaders.CONTENT_LENGTH;
-import static org.apache.http.HttpHeaders.CONTENT_TYPE;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_LENGTH;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_TYPE;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public abstract class BaseHttpsTest extends HttpsServerTestSupport {
 
     protected void assertExchange(Exchange exchange) {
         assertNotNull(exchange);
-
+        assertNull(exchange.getException());
         Message out = exchange.getMessage();
         assertNotNull(out);
         assertHeaders(out.getHeaders());
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierExtensionTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierExtensionTest.java
index a0fa90a3756..2ba4779bb71 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierExtensionTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierExtensionTest.java
@@ -25,15 +25,15 @@ import org.apache.camel.Component;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
 import org.apache.camel.component.http.handler.AuthenticationValidationHandler;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.localserver.RequestBasicAuth;
-import org.apache.http.localserver.ResponseBasicUnauthorized;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.HttpRequestHandler;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.protocol.ResponseContent;
+import org.apache.camel.component.http.interceptor.RequestBasicAuth;
+import org.apache.camel.component.http.interceptor.ResponseBasicUnauthorized;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.HttpRequestHandler;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.ResponseContent;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -56,12 +56,12 @@ public class CamelComponentVerifierExtensionTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap()
                 .setHttpProcessor(getHttpProcessor())
-                .registerHandler("/basic", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/auth",
+                .register("/basic", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/auth",
                         new AuthenticationValidationHandler(
                                 GET.name(), null, null, getExpectedContent(), AUTH_USERNAME, AUTH_PASSWORD))
-                .registerHandler("/redirect", redirectTo(HttpStatus.SC_MOVED_PERMANENTLY, "/redirected"))
-                .registerHandler("/redirected", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/redirect", redirectTo(HttpStatus.SC_MOVED_PERMANENTLY, "/redirected"))
+                .register("/redirected", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
                 .create();
 
         localServer.start();
@@ -86,7 +86,7 @@ public class CamelComponentVerifierExtensionTest extends BaseHttpTest {
     }
 
     private HttpProcessor getHttpProcessor() {
-        return new ImmutableHttpProcessor(
+        return new DefaultHttpProcessor(
                 Collections.singletonList(
                         new RequestBasicAuth()),
                 Arrays.asList(
@@ -99,9 +99,7 @@ public class CamelComponentVerifierExtensionTest extends BaseHttpTest {
     // *************************************************
 
     protected String getLocalServerUri(String contextPath) {
-        return "http://"
-               + localServer.getInetAddress().getHostName()
-               + ":"
+        return "http://localhost:"
                + localServer.getLocalPort()
                + (contextPath != null
                        ? contextPath.startsWith("/") ? contextPath : "/" + contextPath
@@ -111,7 +109,7 @@ public class CamelComponentVerifierExtensionTest extends BaseHttpTest {
     private HttpRequestHandler redirectTo(int code, String path) {
         return (request, response, context) -> {
             response.setHeader("location", getLocalServerUri(path));
-            response.setStatusCode(code);
+            response.setCode(code);
         };
     }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierTest.java
index aedb39ea67e..82d8e1ffc5f 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/CamelComponentVerifierTest.java
@@ -24,15 +24,15 @@ import java.util.Map;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
 import org.apache.camel.component.http.handler.AuthenticationValidationHandler;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.localserver.RequestBasicAuth;
-import org.apache.http.localserver.ResponseBasicUnauthorized;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.HttpRequestHandler;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.protocol.ResponseContent;
+import org.apache.camel.component.http.interceptor.RequestBasicAuth;
+import org.apache.camel.component.http.interceptor.ResponseBasicUnauthorized;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.HttpRequestHandler;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.ResponseContent;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -55,12 +55,12 @@ public class CamelComponentVerifierTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap()
                 .setHttpProcessor(getHttpProcessor())
-                .registerHandler("/basic", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/auth",
+                .register("/basic", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/auth",
                         new AuthenticationValidationHandler(
                                 GET.name(), null, null, getExpectedContent(), AUTH_USERNAME, AUTH_PASSWORD))
-                .registerHandler("/redirect", redirectTo(HttpStatus.SC_MOVED_PERMANENTLY, "/redirected"))
-                .registerHandler("/redirected", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/redirect", redirectTo(HttpStatus.SC_MOVED_PERMANENTLY, "/redirected"))
+                .register("/redirected", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
                 .create();
 
         localServer.start();
@@ -85,7 +85,7 @@ public class CamelComponentVerifierTest extends BaseHttpTest {
     }
 
     private HttpProcessor getHttpProcessor() {
-        return new ImmutableHttpProcessor(
+        return new DefaultHttpProcessor(
                 Collections.singletonList(
                         new RequestBasicAuth()),
                 Arrays.asList(
@@ -98,9 +98,7 @@ public class CamelComponentVerifierTest extends BaseHttpTest {
     // *************************************************
 
     protected String getLocalServerUri(String contextPath) {
-        return "http://"
-               + localServer.getInetAddress().getHostName()
-               + ":"
+        return "http://localhost:"
                + localServer.getLocalPort()
                + (contextPath != null
                        ? contextPath.startsWith("/") ? contextPath : "/" + contextPath
@@ -110,7 +108,7 @@ public class CamelComponentVerifierTest extends BaseHttpTest {
     private HttpRequestHandler redirectTo(int code, String path) {
         return (request, response, context) -> {
             response.setHeader("location", getLocalServerUri(path));
-            response.setStatusCode(code);
+            response.setCode(code);
         };
     }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/FollowRedirectTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/FollowRedirectTest.java
index 0e604c98ec6..d39e2c0cdb0 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/FollowRedirectTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/FollowRedirectTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -35,11 +35,11 @@ public class FollowRedirectTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/someplaceelse", new BasicValidationHandler(GET.name(), null, null, "Bye World"))
-                .registerHandler("/redirect", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/someplaceelse", new BasicValidationHandler(GET.name(), null, null, "Bye World"))
+                .register("/redirect", (request, response, context) -> {
                     response.setHeader("Location", "someplaceelse");
-                    response.setStatusCode(303);
+                    response.setCode(303);
                 }).create();
         localServer.start();
 
@@ -51,7 +51,7 @@ public class FollowRedirectTest extends BaseHttpTest {
         HttpComponent http = context.getComponent("http", HttpComponent.class);
         http.setFollowRedirects(true);
 
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/redirect";
+        String uri = "http://localhost:" + localServer.getLocalPort() + "/redirect";
         Exchange out = fluentTemplate.to(uri).send();
 
         Assertions.assertEquals(200, out.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE));
@@ -64,7 +64,7 @@ public class FollowRedirectTest extends BaseHttpTest {
         HttpComponent http = context.getComponent("http", HttpComponent.class);
         http.setFollowRedirects(false);
 
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+        String uri = "http://localhost:" + localServer.getLocalPort()
                      + "/redirect?throwExceptionOnFailure=false";
         Exchange out = fluentTemplate.to(uri).send();
 
@@ -76,7 +76,7 @@ public class FollowRedirectTest extends BaseHttpTest {
         HttpComponent http = context.getComponent("http", HttpComponent.class);
         http.setRedirectHandlingDisabled(false);
 
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+        String uri = "http://localhost:" + localServer.getLocalPort()
                      + "/redirect?throwExceptionOnFailure=false";
         Exchange out = fluentTemplate.to(uri).send();
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java
index 195aecd55aa..611387fec5c 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java
@@ -38,9 +38,9 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
+import static com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.ContentType.APPLICATION_JSON;
 import static org.apache.camel.component.http.HttpMethods.POST;
-import static org.apache.http.HttpHeaders.HOST;
-import static org.apache.http.entity.ContentType.APPLICATION_JSON;
+import static org.apache.hc.core5.http.HttpHeaders.HOST;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.fail;
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpAuthenticationTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpAuthenticationTest.java
index baedef0cef0..9b37bd0d640 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpAuthenticationTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpAuthenticationTest.java
@@ -23,22 +23,22 @@ import java.util.Map;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.http.handler.AuthenticationValidationHandler;
-import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.localserver.RequestBasicAuth;
-import org.apache.http.localserver.ResponseBasicUnauthorized;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.protocol.ResponseContent;
+import org.apache.camel.component.http.interceptor.RequestBasicAuth;
+import org.apache.camel.component.http.interceptor.ResponseBasicUnauthorized;
+import org.apache.hc.core5.http.HttpRequestInterceptor;
+import org.apache.hc.core5.http.HttpResponseInterceptor;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.ResponseContent;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.component.http.HttpMethods.GET;
-import static org.apache.http.HttpHeaders.CONTENT_TYPE;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_TYPE;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
@@ -47,16 +47,16 @@ public class HttpAuthenticationTest extends BaseHttpTest {
 
     private HttpServer localServer;
 
-    private String user = "camel";
-    private String password = "password";
+    private final String user = "camel";
+    private final String password = "password";
 
     @BeforeEach
     @Override
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/search",
+                .setSslContext(getSSLContext())
+                .register("/search",
                         new AuthenticationValidationHandler(GET.name(), null, null, getExpectedContent(), user, password))
                 .create();
         localServer.start();
@@ -76,7 +76,7 @@ public class HttpAuthenticationTest extends BaseHttpTest {
 
     @Test
     public void basicAuthenticationShouldSuccess() throws Exception {
-        Exchange exchange = template.request("http://" + localServer.getInetAddress().getHostName() + ":"
+        Exchange exchange = template.request("http://localhost:"
                                              + localServer.getLocalPort() + "/search?authUsername=" + user + "&authPassword="
                                              + password,
                 exchange1 -> {
@@ -87,7 +87,7 @@ public class HttpAuthenticationTest extends BaseHttpTest {
 
     @Test
     public void basicAuthenticationPreemptiveShouldSuccess() throws Exception {
-        Exchange exchange = template.request("http://" + localServer.getInetAddress().getHostName() + ":"
+        Exchange exchange = template.request("http://localhost:"
                                              + localServer.getLocalPort() + "/search?authUsername=" + user + "&authPassword="
                                              + password + "&authenticationPreemptive=true",
                 exchange1 -> {
@@ -99,7 +99,7 @@ public class HttpAuthenticationTest extends BaseHttpTest {
     @Test
     public void basicAuthenticationShouldFailWithoutCreds() throws Exception {
         Exchange exchange
-                = template.request("http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+                = template.request("http://localhost:" + localServer.getLocalPort()
                                    + "/search?throwExceptionOnFailure=false",
                         exchange1 -> {
                         });
@@ -110,7 +110,7 @@ public class HttpAuthenticationTest extends BaseHttpTest {
     @Test
     public void basicAuthenticationShouldFailWithWrongCreds() throws Exception {
         Exchange exchange = template
-                .request("http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+                .request("http://localhost:" + localServer.getLocalPort()
                          + "/search?throwExceptionOnFailure=false&authUsername=camel&authPassword=wrong",
                         exchange1 -> {
                         });
@@ -126,7 +126,7 @@ public class HttpAuthenticationTest extends BaseHttpTest {
         responseInterceptors.add(new ResponseContent());
         responseInterceptors.add(new ResponseBasicUnauthorized());
 
-        return new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
+        return new DefaultHttpProcessor(requestInterceptors, responseInterceptors);
     }
 
     protected void assertExchangeFailed(Exchange exchange) {
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyTest.java
index 9fb2d683b69..5dd95a5a2e5 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyTest.java
@@ -24,20 +24,20 @@ import java.util.Map;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
 import org.apache.camel.component.http.handler.HeaderValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
+import static com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.http.ContentType.IMAGE_JPEG;
 import static org.apache.camel.component.http.HttpMethods.POST;
-import static org.apache.http.HttpHeaders.CONTENT_TYPE;
-import static org.apache.http.entity.ContentType.IMAGE_JPEG;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_TYPE;
 
 public class HttpBodyTest extends BaseHttpTest {
     private String protocolString = "http://";
     // default content encoding of the local test server
-    private String charset = "ISO-8859-1";
+    private final String charset = "ISO-8859-1";
     private HttpServer localServer;
     private String endpointUrl;
 
@@ -49,14 +49,14 @@ public class HttpBodyTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/post", new BasicValidationHandler(POST.name(), null, getBody(), getExpectedContent()))
-                .registerHandler("/post1",
+                .setSslContext(getSSLContext())
+                .register("/post", new BasicValidationHandler(POST.name(), null, getBody(), getExpectedContent()))
+                .register("/post1",
                         new HeaderValidationHandler(POST.name(), null, null, getExpectedContent(), expectedHeaders))
                 .create();
         localServer.start();
 
-        endpointUrl = getProtocolString() + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = getProtocolString() + "localhost:" + localServer.getLocalPort();
 
         super.setUp();
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyWithOtherProtocalNameTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyWithOtherProtocolNameTest.java
similarity index 90%
rename from components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyWithOtherProtocalNameTest.java
rename to components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyWithOtherProtocolNameTest.java
index 5fd61a4248c..39857c3f580 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyWithOtherProtocalNameTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBodyWithOtherProtocolNameTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.http;
 import org.apache.camel.CamelContext;
 import org.junit.jupiter.api.BeforeEach;
 
-public class HttpBodyWithOtherProtocalNameTest extends HttpBodyTest {
+public class HttpBodyWithOtherProtocolNameTest extends HttpBodyTest {
 
     @BeforeEach
     @Override
@@ -31,7 +31,7 @@ public class HttpBodyWithOtherProtocalNameTest extends HttpBodyTest {
     @Override
     public CamelContext createCamelContext() throws Exception {
         CamelContext answer = super.createCamelContext();
-        // register the a new HttpComponent with different protocol name
+        // register a new HttpComponent with different protocol name
         answer.addComponent("newHttp", new HttpComponent());
         return answer;
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBridgeEndpointTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBridgeEndpointTest.java
index 68c7e2612e9..fa2cc3e25f8 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBridgeEndpointTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpBridgeEndpointTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.component.http;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicRawQueryValidationHandler;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -41,13 +41,13 @@ public class HttpBridgeEndpointTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/query", new BasicRawQueryValidationHandler(GET.name(), "x=%3B", null, getExpectedContent()))
+                .setSslContext(getSSLContext())
+                .register("/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/query", new BasicRawQueryValidationHandler(GET.name(), "x=%3B", null, getExpectedContent()))
                 .create();
         localServer.start();
 
-        url = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        url = "http://localhost:" + localServer.getLocalPort();
 
         super.setUp();
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersNotCopiedTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersNotCopiedTest.java
index 7ea169d7c6f..0a30c1a0576 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersNotCopiedTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersNotCopiedTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.http;
 import java.util.Map;
 
 import org.apache.camel.Exchange;
-import org.apache.http.HttpStatus;
+import org.apache.hc.core5.http.HttpStatus;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersTest.java
index 67db64685ae..f2716960d0d 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCamelHeadersTest.java
@@ -22,19 +22,19 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.HeaderValidationHandler;
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.component.http.HttpMethods.GET;
-import static org.apache.http.HttpHeaders.ACCEPT_LANGUAGE;
+import static org.apache.hc.core5.http.HttpHeaders.ACCEPT_LANGUAGE;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class HttpCamelHeadersTest extends BaseHttpTest {
@@ -51,8 +51,8 @@ public class HttpCamelHeadersTest extends BaseHttpTest {
         localServer
                 = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                         .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                        .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                        .registerHandler("/",
+                        .setSslContext(getSSLContext())
+                        .register("/",
                                 new MyHeaderValidationHandler(GET.name(), "HTTP/1.0", getExpectedContent(), expectedHeaders))
                         .create();
         localServer.start();
@@ -85,9 +85,7 @@ public class HttpCamelHeadersTest extends BaseHttpTest {
 
     private Exchange doExchange() {
         return template.request(
-                "http://"
-                                + localServer.getInetAddress().getHostName()
-                                + ":"
+                "http://localhost:"
                                 + localServer.getLocalPort()
                                 + "/"
                                 + setupEndpointParams(),
@@ -102,8 +100,8 @@ public class HttpCamelHeadersTest extends BaseHttpTest {
         return "";
     }
 
-    private class MyHeaderValidationHandler extends HeaderValidationHandler {
-        private String expectProtocolVersion;
+    private static class MyHeaderValidationHandler extends HeaderValidationHandler {
+        private final String expectProtocolVersion;
 
         MyHeaderValidationHandler(String expectedMethod, String protocolVersion,
                                   String responseContent, Map<String, String> expectedHeaders) {
@@ -113,11 +111,11 @@ public class HttpCamelHeadersTest extends BaseHttpTest {
 
         @Override
         public void handle(
-                final HttpRequest request, final HttpResponse response,
+                final ClassicHttpRequest request, final ClassicHttpResponse response,
                 final HttpContext context)
                 throws HttpException, IOException {
-            if (!expectProtocolVersion.equals(request.getProtocolVersion().toString())) {
-                response.setStatusCode(HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
+            if (!expectProtocolVersion.equals(request.getVersion().toString())) {
+                response.setCode(HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
                 return;
             }
             super.handle(request, response, context);
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCharsetTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCharsetTest.java
index 9cfd73b3433..3b0d93d7a5f 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCharsetTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCharsetTest.java
@@ -20,8 +20,8 @@ import java.io.ByteArrayInputStream;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -31,7 +31,7 @@ import static org.apache.camel.component.http.HttpMethods.POST;
 public class HttpCharsetTest extends BaseHttpTest {
 
     // default content encoding of the local test server
-    private String charset = "ISO-8859-1";
+    private final String charset = "ISO-8859-1";
 
     private HttpServer localServer;
 
@@ -40,8 +40,8 @@ public class HttpCharsetTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new BasicValidationHandler(POST.name(), null, getBody(), getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/", new BasicValidationHandler(POST.name(), null, getBody(), getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -60,7 +60,7 @@ public class HttpCharsetTest extends BaseHttpTest {
     @Test
     public void sendCharsetInExchangeProperty() throws Exception {
         Exchange exchange = template.request(
-                "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/", exchange1 -> {
+                "http://localhost:" + localServer.getLocalPort() + "/", exchange1 -> {
                     exchange1.setProperty(Exchange.CHARSET_NAME, charset);
                     exchange1.getIn().setBody(getBody());
                 });
@@ -71,7 +71,7 @@ public class HttpCharsetTest extends BaseHttpTest {
     @Test
     public void sendByteArrayCharsetInExchangeProperty() throws Exception {
         Exchange exchange = template.request(
-                "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/", exchange1 -> {
+                "http://localhost:" + localServer.getLocalPort() + "/", exchange1 -> {
                     exchange1.setProperty(Exchange.CHARSET_NAME, charset);
                     exchange1.getIn().setBody(getBody().getBytes(charset));
                 });
@@ -82,7 +82,7 @@ public class HttpCharsetTest extends BaseHttpTest {
     @Test
     public void sendInputStreamCharsetInExchangeProperty() throws Exception {
         Exchange exchange = template.request(
-                "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/", exchange1 -> {
+                "http://localhost:" + localServer.getLocalPort() + "/", exchange1 -> {
                     exchange1.setProperty(Exchange.CHARSET_NAME, charset);
                     exchange1.getIn().setBody(new ByteArrayInputStream(getBody().getBytes(charset)));
                 });
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCompressionTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCompressionTest.java
index cc0fa4a2e74..8a1f28db4da 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCompressionTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCompressionTest.java
@@ -29,32 +29,32 @@ import java.util.zip.GZIPOutputStream;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.http.handler.HeaderValidationHandler;
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.HttpEntityWrapper;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.localserver.ResponseBasicUnauthorized;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.util.EntityUtils;
+import org.apache.camel.component.http.interceptor.ResponseBasicUnauthorized;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.EntityDetails;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpRequestInterceptor;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpResponseInterceptor;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.HttpEntityWrapper;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.http.common.HttpMethods.POST;
-import static org.apache.http.HttpHeaders.CONTENT_ENCODING;
-import static org.apache.http.HttpHeaders.CONTENT_TYPE;
-import static org.apache.http.entity.ContentType.TEXT_PLAIN;
+import static org.apache.hc.core5.http.ContentType.TEXT_PLAIN;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_ENCODING;
+import static org.apache.hc.core5.http.HttpHeaders.CONTENT_TYPE;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
@@ -71,8 +71,8 @@ public class HttpCompressionTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/",
+                .setSslContext(getSSLContext())
+                .register("/",
                         new HeaderValidationHandler(POST.name(), null, getBody(), getExpectedContent(), expectedHeaders))
                 .create();
         localServer.start();
@@ -93,7 +93,7 @@ public class HttpCompressionTest extends BaseHttpTest {
     @Test
     public void compressedHttpPost() {
         Exchange exchange = template.request(
-                "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/", exchange1 -> {
+                "http://localhost:" + localServer.getLocalPort() + "/", exchange1 -> {
                     exchange1.getIn().setHeader(Exchange.CONTENT_TYPE, "text/plain");
                     exchange1.getIn().setHeader(Exchange.CONTENT_ENCODING, "gzip");
                     exchange1.getIn().setBody(getBody());
@@ -118,7 +118,7 @@ public class HttpCompressionTest extends BaseHttpTest {
         responseInterceptors.add(new ResponseCompressingInterceptor());
         responseInterceptors.add(new ResponseBasicUnauthorized());
 
-        return new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
+        return new DefaultHttpProcessor(requestInterceptors, responseInterceptors);
     }
 
     protected String getBody() {
@@ -128,15 +128,14 @@ public class HttpCompressionTest extends BaseHttpTest {
     static class RequestDecompressingInterceptor implements HttpRequestInterceptor {
 
         @Override
-        public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
+        public void process(HttpRequest request, EntityDetails details, HttpContext context) throws HttpException, IOException {
             Header contentEncoding = request.getFirstHeader(CONTENT_ENCODING);
 
             if (contentEncoding != null
                     && contentEncoding.getValue().equalsIgnoreCase("gzip")) {
-                HttpEntity entity = ((HttpEntityEnclosingRequest) request)
-                        .getEntity();
-                ((HttpEntityEnclosingRequest) request)
-                        .setEntity(new GzipDecompressingEntity(entity));
+                ClassicHttpRequest classicHttpRequest = (ClassicHttpRequest) request;
+                HttpEntity entity = classicHttpRequest.getEntity();
+                classicHttpRequest.setEntity(new GzipDecompressingEntity(entity));
             }
         }
 
@@ -150,8 +149,7 @@ public class HttpCompressionTest extends BaseHttpTest {
             public InputStream getContent()
                     throws IOException,
                     IllegalStateException {
-                InputStream wrappedIn = wrappedEntity.getContent();
-                return new GZIPInputStream(wrappedIn);
+                return new GZIPInputStream(super.getContent());
             }
 
             @Override
@@ -169,10 +167,12 @@ public class HttpCompressionTest extends BaseHttpTest {
     static class ResponseCompressingInterceptor implements HttpResponseInterceptor {
 
         @Override
-        public void process(HttpResponse response, HttpContext context) throws HttpException, IOException {
+        public void process(HttpResponse response, EntityDetails details, HttpContext context)
+                throws HttpException, IOException {
             response.setHeader(CONTENT_ENCODING, "gzip");
-            HttpEntity entity = response.getEntity();
-            response.setEntity(new GzipCompressingEntity(entity));
+            ClassicHttpResponse classicHttpResponse = (ClassicHttpResponse) response;
+            HttpEntity entity = classicHttpResponse.getEntity();
+            classicHttpResponse.setEntity(new GzipCompressingEntity(entity));
         }
 
         static class GzipCompressingEntity extends HttpEntityWrapper {
@@ -182,15 +182,15 @@ public class HttpCompressionTest extends BaseHttpTest {
             }
 
             @Override
-            public Header getContentEncoding() {
-                return new BasicHeader(CONTENT_ENCODING, "gzip");
+            public String getContentEncoding() {
+                return "gzip";
             }
 
             @Override
             public void writeTo(OutputStream outStream) throws IOException {
-                GZIPOutputStream gzip = new GZIPOutputStream(outStream);
-                gzip.write(EntityUtils.toByteArray(wrappedEntity));
-                gzip.close();
+                try (GZIPOutputStream gzip = new GZIPOutputStream(outStream)) {
+                    super.writeTo(gzip);
+                }
             }
 
             @Override
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpConcurrentTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpConcurrentTest.java
index 4ca96c072f3..5250255b0ae 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpConcurrentTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpConcurrentTest.java
@@ -25,10 +25,10 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -46,14 +46,14 @@ public class HttpConcurrentTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/", (request, response, context) -> {
                     try {
                         Thread.sleep(1000);
                     } catch (InterruptedException e) {
                         // ignore
                     }
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setCode(HttpStatus.SC_OK);
                     response.setEntity(new StringEntity("" + counter.incrementAndGet()));
                 }).create();
         localServer.start();
@@ -88,7 +88,7 @@ public class HttpConcurrentTest extends BaseHttpTest {
         Map<Integer, Future<String>> responses = new HashMap<>();
         for (int i = 0; i < files; i++) {
             Future<String> out = executor.submit(() -> template.requestBody(
-                    "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort(), null,
+                    "http://localhost:" + localServer.getLocalPort(), null,
                     String.class));
             responses.put(i, out);
         }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCredentialsHelperTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCredentialsHelperTest.java
index 10e0de90341..84fa60d15f8 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCredentialsHelperTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpCredentialsHelperTest.java
@@ -17,72 +17,77 @@
 package org.apache.camel.component.http;
 
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.Credentials;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.client.CredentialsProvider;
+import org.apache.hc.client5.http.auth.AuthScope;
+import org.apache.hc.client5.http.auth.Credentials;
+import org.apache.hc.client5.http.auth.CredentialsProvider;
+import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
+import org.apache.hc.core5.http.protocol.BasicHttpContext;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.junit.jupiter.api.Test;
 
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 class HttpCredentialsHelperTest extends CamelTestSupport {
 
-    HttpCredentialsHelper credentialsHelper = new HttpCredentialsHelper();
+    private final HttpCredentialsHelper credentialsHelper = new HttpCredentialsHelper();
+    private final HttpContext context = new BasicHttpContext();
 
     private final String host = "credentials.test.org";
-    private final Integer port = Integer.valueOf(80);
+    private final Integer port = 80;
     private final String proxyHost = "proxy.test.org";
-    private final Integer proxyPort = Integer.valueOf(8080);
-    private String username = "testUser";
-    private String password = "testPassowrd";
-
-    private String proxyUsername = "proxyUser";
-    private String proxyPassword = "proxyPassowrd";
+    private final Integer proxyPort = 8080;
+    private final String username = "testUser";
+    private final String password = "testPassowrd";
 
     @Test
     void testOneCredential() {
-        Credentials credentials = new UsernamePasswordCredentials(username, password);
+        Credentials credentials = new UsernamePasswordCredentials(username, password.toCharArray());
         CredentialsProvider provider = credentialsHelper.getCredentialsProvider(host, port, credentials);
         assertNotNull(provider);
-        assertEquals(credentials, provider.getCredentials(new AuthScope(host, port)));
+        assertEquals(credentials, provider.getCredentials(new AuthScope(host, port), context));
     }
 
     @Test
     void testCredentialsNoPort() {
-        Credentials credentials = new UsernamePasswordCredentials(username, password);
+        Credentials credentials = new UsernamePasswordCredentials(username, password.toCharArray());
         CredentialsProvider provider = credentialsHelper.getCredentialsProvider(host, null, credentials);
         assertNotNull(provider);
-        assertEquals(credentials, provider.getCredentials(new AuthScope(host, AuthScope.ANY_PORT)));
+        assertEquals(credentials, provider.getCredentials(new AuthScope(host, -1), context));
     }
 
     @Test
     void testTwoCredentials() {
-        Credentials credentials = new UsernamePasswordCredentials(username, password);
+        Credentials credentials = new UsernamePasswordCredentials(username, password.toCharArray());
         CredentialsProvider provider = credentialsHelper.getCredentialsProvider(host, port, credentials);
-        Credentials proxyCredentials = new UsernamePasswordCredentials(proxyUsername, proxyPassword);
+        String proxyPassword = "proxyPassowrd";
+        String proxyUsername = "proxyUser";
+        Credentials proxyCredentials = new UsernamePasswordCredentials(proxyUsername, proxyPassword.toCharArray());
         CredentialsProvider provider2 = credentialsHelper.getCredentialsProvider(proxyHost, proxyPort,
                 proxyCredentials);
 
         assertNotNull(provider);
         assertEquals(provider, provider2);
-        assertEquals(credentials, provider.getCredentials(new AuthScope(host, port)));
-        assertEquals(proxyCredentials, provider.getCredentials(new AuthScope(proxyHost, proxyPort)));
+        assertEquals(credentials, provider.getCredentials(new AuthScope(host, port), context));
+        assertEquals(proxyCredentials, provider.getCredentials(new AuthScope(proxyHost, proxyPort), context));
 
     }
 
     @Test
     void testTwoCredentialsDifferentHttpComponents() {
-        Credentials credentials1 = new UsernamePasswordCredentials(username, password);
+        Credentials credentials1 = new UsernamePasswordCredentials(username, password.toCharArray());
         CredentialsProvider provider1 = credentialsHelper.getCredentialsProvider(host, port, credentials1);
-        Credentials credentials2 = new UsernamePasswordCredentials(username + "2", password + "2");
+        Credentials credentials2 = new UsernamePasswordCredentials(username + "2", (password + "2").toCharArray());
 
         CredentialsProvider provider2
                 = new HttpCredentialsHelper().getCredentialsProvider(proxyHost, proxyPort, credentials2);
         assertNotEquals(provider1, provider2);
-        assertEquals(credentials1, provider1.getCredentials(new AuthScope(host, port)));
-        assertEquals(credentials2, provider2.getCredentials(new AuthScope(proxyHost, proxyPort)));
-        assertNull(provider2.getCredentials(new AuthScope(host, port)));
-        assertNull(provider1.getCredentials(new AuthScope(proxyHost, proxyPort)));
+        assertEquals(credentials1, provider1.getCredentials(new AuthScope(host, port), context));
+        assertEquals(credentials2, provider2.getCredentials(new AuthScope(proxyHost, proxyPort), context));
+        assertNull(provider2.getCredentials(new AuthScope(host, port), context));
+        assertNull(provider1.getCredentials(new AuthScope(proxyHost, proxyPort), context));
     }
 
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java
index 6c5a5a78778..d7b2ac409a7 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java
@@ -21,9 +21,9 @@ import java.util.Map;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.conn.HttpHostConnectException;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.client5.http.HttpHostConnectException;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Disabled;
@@ -44,8 +44,8 @@ public class HttpDefaultPortNumberTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -67,9 +67,9 @@ public class HttpDefaultPortNumberTest extends BaseHttpTest {
             @Override
             public void configure() {
                 from("direct:start")
-                        .to("http://" + localServer.getInetAddress().getHostName() + "/search");
+                        .to("http://localhost/search");
                 from("direct:dummy")
-                        .to("http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+                        .to("http://localhost:" + localServer.getLocalPort()
                             + "/search");
             }
         });
@@ -87,9 +87,9 @@ public class HttpDefaultPortNumberTest extends BaseHttpTest {
             @Override
             public void configure() {
                 from("direct:start")
-                        .to("http://" + localServer.getInetAddress().getHostName() + ":80/search");
+                        .to("http://localhost:80/search");
                 from("direct:dummy")
-                        .to("http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+                        .to("http://localhost:" + localServer.getLocalPort()
                             + "/search");
             }
         });
@@ -107,9 +107,9 @@ public class HttpDefaultPortNumberTest extends BaseHttpTest {
             @Override
             public void configure() {
                 from("direct:start")
-                        .to("http://" + localServer.getInetAddress().getHostName() + "/search");
+                        .to("http://localhost/search");
                 from("direct:dummy")
-                        .to("http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+                        .to("http://localhost:" + localServer.getLocalPort()
                             + "/search");
             }
         });
@@ -128,7 +128,7 @@ public class HttpDefaultPortNumberTest extends BaseHttpTest {
             @Override
             public void configure() {
                 from("direct:start")
-                        .to("http://" + localServer.getInetAddress().getHostName() + "/search");
+                        .to("http://localhost/search");
             }
         });
 
@@ -152,6 +152,6 @@ public class HttpDefaultPortNumberTest extends BaseHttpTest {
         //and got an exception:
         assertIsInstanceOf(HttpHostConnectException.class, exchange.getException());
         //with message:
-        assertEquals("Connection to http://127.0.0.1" + portExt + " refused", exchange.getException().getMessage());
+        assertEquals("Connection to http://localhost" + portExt + " refused", exchange.getException().getMessage());
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java
index a94f7a4eb11..5bf884d1a5e 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java
@@ -22,8 +22,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.TypeConversionException;
 import org.apache.camel.TypeConverter;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -43,8 +43,8 @@ public class HttpDisableStreamCacheTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/test/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/test/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -62,7 +62,7 @@ public class HttpDisableStreamCacheTest extends BaseHttpTest {
 
     @Test
     public void httpDisableStreamCache() {
-        Exchange exchange = template.request("http://" + localServer.getInetAddress().getHostName() + ":"
+        Exchange exchange = template.request("http://localhost:"
                                              + localServer.getLocalPort() + "/test/?disableStreamCache=true",
                 exchange1 -> {
                 });
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointURLTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointURLTest.java
index b3656dda5e1..e29c611c325 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointURLTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointURLTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.component.http;
 import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.camel.util.URISupport;
-import org.apache.http.conn.HttpClientConnectionManager;
-import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
+import org.apache.hc.client5.http.io.HttpClientConnectionManager;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -62,7 +62,6 @@ public class HttpEndpointURLTest extends CamelTestSupport {
                 = context.getEndpoint("http://www.google.com?maxTotalConnections=40&connectionsPerRoute=5", HttpEndpoint.class);
         HttpClientConnectionManager connectionManager = http1.getClientConnectionManager();
         assertTrue(connectionManager instanceof PoolingHttpClientConnectionManager, "Get a wrong type of connection manager");
-        @SuppressWarnings("resource")
         PoolingHttpClientConnectionManager poolManager = (PoolingHttpClientConnectionManager) connectionManager;
         assertEquals(40, poolManager.getMaxTotal(), "Get a wrong setting of maxTotalConnections");
         assertEquals(5, poolManager.getDefaultMaxPerRoute(), "Get a wrong setting of connectionsPerRoute");
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointUriAssemblerTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointUriAssemblerTest.java
index 9ad2e3e892b..02ba33c95f5 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointUriAssemblerTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointUriAssemblerTest.java
@@ -40,20 +40,20 @@ public class HttpEndpointUriAssemblerTest {
         params.put("proxyAuthPassword", "pwd");
 
         // should find the source code generated assembler via classpath
-        CamelContext context = new DefaultCamelContext();
-        context.start();
+        try (CamelContext context = new DefaultCamelContext()) {
+            context.start();
 
-        EndpointUriFactory assembler = context.getCamelContextExtension().getEndpointUriFactory("https");
+            EndpointUriFactory assembler = context.getCamelContextExtension().getEndpointUriFactory("https");
 
-        assertNotNull(assembler);
-        assertTrue(assembler instanceof HttpEndpointUriFactory);
+            assertNotNull(assembler);
+            assertTrue(assembler instanceof HttpEndpointUriFactory);
 
-        String uri = assembler.buildUri("https", params);
-        assertNotNull(uri);
-        assertEquals(
-                "https://www.google.com?proxyAuthHost=myotherproxy&proxyAuthPassword=RAW(pwd)&proxyAuthPort=2345&proxyAuthUsername=RAW(usr)",
-                uri);
+            String uri = assembler.buildUri("https", params);
+            assertNotNull(uri);
+            assertEquals(
+                    "https://www.google.com?proxyAuthHost=myotherproxy&proxyAuthPassword=RAW(pwd)&proxyAuthPort=2345&proxyAuthUsername=RAW(usr)",
+                    uri);
 
-        context.stop();
+        }
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpMethodsTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpMethodsTest.java
index 569e5f8ace1..88882baaca1 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpMethodsTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpMethodsTest.java
@@ -21,9 +21,9 @@ import java.util.Map;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -52,22 +52,22 @@ public class HttpMethodsTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/get", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/patch", new BasicValidationHandler(PATCH.name(), null, null, getExpectedContent()))
-                .registerHandler("/patch1",
+                .setSslContext(getSSLContext())
+                .register("/get", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/patch", new BasicValidationHandler(PATCH.name(), null, null, getExpectedContent()))
+                .register("/patch1",
                         new BasicValidationHandler(PATCH.name(), null, "rocks camel?", getExpectedContent()))
-                .registerHandler("/post", new BasicValidationHandler(POST.name(), null, null, getExpectedContent()))
-                .registerHandler("/post1", new BasicValidationHandler(POST.name(), null, "rocks camel?", getExpectedContent()))
-                .registerHandler("/put", new BasicValidationHandler(PUT.name(), null, null, getExpectedContent()))
-                .registerHandler("/trace", new BasicValidationHandler(TRACE.name(), null, null, getExpectedContent()))
-                .registerHandler("/options", new BasicValidationHandler(OPTIONS.name(), null, null, getExpectedContent()))
-                .registerHandler("/delete", new BasicValidationHandler(DELETE.name(), null, null, getExpectedContent()))
-                .registerHandler("/delete1", new BasicValidationHandler(DELETE.name(), null, null, getExpectedContent()))
-                .registerHandler("/head", new BasicValidationHandler(HEAD.name(), null, null, getExpectedContent())).create();
+                .register("/post", new BasicValidationHandler(POST.name(), null, null, getExpectedContent()))
+                .register("/post1", new BasicValidationHandler(POST.name(), null, "rocks camel?", getExpectedContent()))
+                .register("/put", new BasicValidationHandler(PUT.name(), null, null, getExpectedContent()))
+                .register("/trace", new BasicValidationHandler(TRACE.name(), null, null, getExpectedContent()))
+                .register("/options", new BasicValidationHandler(OPTIONS.name(), null, null, getExpectedContent()))
+                .register("/delete", new BasicValidationHandler(DELETE.name(), null, null, getExpectedContent()))
+                .register("/delete1", new BasicValidationHandler(DELETE.name(), null, null, getExpectedContent()))
+                .register("/head", new BasicValidationHandler(HEAD.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
-        baseUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        baseUrl = "http://localhost:" + localServer.getLocalPort();
 
         super.setUp();
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoCamelHeaderTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoCamelHeaderTest.java
index 6e78b17e2a8..587b879f115 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoCamelHeaderTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoCamelHeaderTest.java
@@ -17,10 +17,10 @@
 package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
-import org.apache.http.Header;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -29,6 +29,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class HttpNoCamelHeaderTest extends BaseHttpTest {
 
@@ -39,15 +40,15 @@ public class HttpNoCamelHeaderTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/hello", (request, response, context) -> {
-                    response.setStatusCode(HttpStatus.SC_OK);
+                .setSslContext(getSSLContext())
+                .register("/hello", (request, response, context) -> {
+                    response.setCode(HttpStatus.SC_OK);
                     Object header = request.getFirstHeader(Exchange.FILE_NAME);
                     assertNull(header, "There should be no Camel header");
 
-                    for (Header h : request.getAllHeaders()) {
+                    for (Header h : request.getHeaders()) {
                         if (h.getName().startsWith("Camel") || h.getName().startsWith("org.apache.camel")) {
-                            assertNull(h, "There should be no Camel header");
+                            fail("There should be no Camel header");
                         }
                     }
 
@@ -73,7 +74,7 @@ public class HttpNoCamelHeaderTest extends BaseHttpTest {
     @Test
     public void testNoCamelHeader() throws Exception {
         Exchange out = template.request(
-                "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/hello",
+                "http://localhost:" + localServer.getLocalPort() + "/hello",
                 exchange -> {
                     exchange.getIn().setHeader(Exchange.CONTENT_TYPE, "text/plain");
                     exchange.getIn().setHeader(Exchange.FILE_NAME, "hello.txt");
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionRedeliveryTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionRedeliveryTest.java
index 74c5c0a3f1e..a02bd1b45e8 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionRedeliveryTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionRedeliveryTest.java
@@ -17,13 +17,13 @@
 package org.apache.camel.component.http;
 
 import java.net.ConnectException;
-import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.util.TimeValue;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -42,8 +42,8 @@ public class HttpNoConnectionRedeliveryTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -71,7 +71,7 @@ public class HttpNoConnectionRedeliveryTest extends BaseHttpTest {
         // stop server so there are no connection
         // and wait for it to terminate
         localServer.stop();
-        localServer.awaitTermination(5000, TimeUnit.MILLISECONDS);
+        localServer.awaitTermination(TimeValue.ofSeconds(5));
 
         Exchange exchange = template.request("direct:start", null);
         assertTrue(exchange.isFailed());
@@ -96,7 +96,7 @@ public class HttpNoConnectionRedeliveryTest extends BaseHttpTest {
                         .maximumRedeliveryDelay(5000)
                         .useExponentialBackOff()
                         .end()
-                        .to("http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+                        .to("http://localhost:" + localServer.getLocalPort()
                             + "/search");
             }
         };
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionTest.java
index 13e5074176d..1a9e39d67e1 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpNoConnectionTest.java
@@ -17,12 +17,12 @@
 package org.apache.camel.component.http;
 
 import java.net.ConnectException;
-import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.util.TimeValue;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -43,11 +43,11 @@ public class HttpNoConnectionTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
 
         super.setUp();
     }
@@ -75,7 +75,7 @@ public class HttpNoConnectionTest extends BaseHttpTest {
         String url = endpointUrl + "/search";
         // stop server so there are no connection
         localServer.stop();
-        localServer.awaitTermination(1000, TimeUnit.MILLISECONDS);
+        localServer.awaitTermination(TimeValue.ofSeconds(1));
 
         Exchange reply = template.request(url, null);
         Exception e = reply.getException();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPathTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPathTest.java
index 03f7975a4d9..66cbf040f0c 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPathTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPathTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -37,15 +37,15 @@ public class HttpPathTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/test%20/path", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/testWithQueryParams",
+                .setSslContext(getSSLContext())
+                .register("/search", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/test%20/path", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/testWithQueryParams",
                         new BasicValidationHandler(GET.name(), "abc=123", null, getExpectedContent()))
                 .create();
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
 
         super.setUp();
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPollingConsumerTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPollingConsumerTest.java
index 79a7a50ed19..d6a3ac7f055 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPollingConsumerTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpPollingConsumerTest.java
@@ -20,8 +20,8 @@ import java.net.SocketTimeoutException;
 
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.http.handler.DelayValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -34,8 +34,8 @@ import static org.junit.jupiter.api.Assertions.fail;
 public class HttpPollingConsumerTest extends BaseHttpTest {
 
     private HttpServer localServer;
-    private String user = "camel";
-    private String password = "password";
+    private final String user = "camel";
+    private final String password = "password";
     private String endpointUrl;
 
     @BeforeEach
@@ -45,11 +45,11 @@ public class HttpPollingConsumerTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new DelayValidationHandler(GET.name(), null, null, getExpectedContent(), 1000)).create();
+                .setSslContext(getSSLContext())
+                .register("/", new DelayValidationHandler(GET.name(), null, null, getExpectedContent(), 1000)).create();
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
     }
 
     @AfterEach
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerBridgeEndpointTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerBridgeEndpointTest.java
index f1f3ed7c415..92a5d2c9cd6 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerBridgeEndpointTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerBridgeEndpointTest.java
@@ -23,8 +23,8 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.HeaderValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -33,8 +33,8 @@ public class HttpProducerBridgeEndpointTest extends BaseHttpTest {
 
     private static final Instant INSTANT = Instant.parse("2021-06-10T14:42:00Z");
     private static final String STRING = "text";
-    private static final Integer INTEGER = Integer.valueOf(1);
-    private static final Long LONG = Long.valueOf(999999999999999L);
+    private static final Integer INTEGER = 1;
+    private static final Long LONG = 999999999999999L;
     private static final Boolean BOOLEAN = true;
     private static final String QUERY
             = "qp1=" + INSTANT + "&qp2=" + STRING + "&qp3=" + INTEGER + "&qp4=" + LONG + "&qp5=" + BOOLEAN;
@@ -54,8 +54,8 @@ public class HttpProducerBridgeEndpointTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/bridged",
+                .setSslContext(getSSLContext())
+                .register("/bridged",
                         new HeaderValidationHandler(
                                 "GET",
                                 QUERY,
@@ -63,7 +63,7 @@ public class HttpProducerBridgeEndpointTest extends BaseHttpTest {
                                 getExpectedContent(),
                                 null,
                                 Arrays.asList(absentHeaders)))
-                .registerHandler("/notbridged",
+                .register("/notbridged",
                         new HeaderValidationHandler(
                                 "GET",
                                 QUERY,
@@ -94,8 +94,7 @@ public class HttpProducerBridgeEndpointTest extends BaseHttpTest {
         component.setConnectionTimeToLive(1000L);
 
         HttpEndpoint endpoint = (HttpEndpoint) component
-                .createEndpoint("http://" + localServer.getInetAddress().getHostName() + ":"
-                                + localServer.getLocalPort() + "/bridged?bridgeEndpoint=true");
+                .createEndpoint("http://localhost:" + localServer.getLocalPort() + "/bridged?bridgeEndpoint=true");
         HttpProducer producer = new HttpProducer(endpoint);
 
         Exchange exchange = producer.createExchange();
@@ -121,8 +120,7 @@ public class HttpProducerBridgeEndpointTest extends BaseHttpTest {
         component.setConnectionTimeToLive(1000L);
 
         HttpEndpoint endpoint = (HttpEndpoint) component
-                .createEndpoint("http://" + localServer.getInetAddress().getHostName() + ":"
-                                + localServer.getLocalPort() + "/notbridged");
+                .createEndpoint("http://localhost:" + localServer.getLocalPort() + "/notbridged");
         HttpProducer producer = new HttpProducer(endpoint);
 
         Exchange exchange = producer.createExchange();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerConnectionCloseTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerConnectionCloseTest.java
index 0d0c64efbb6..2167895d457 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerConnectionCloseTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerConnectionCloseTest.java
@@ -22,9 +22,9 @@ import org.apache.camel.component.http.handler.BasicValidationHandler;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.http.common.HttpHeaderFilterStrategy;
 import org.apache.camel.spi.Registry;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.protocol.HTTP;
+import org.apache.hc.core5.http.HeaderElements;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -47,8 +47,8 @@ public class HttpProducerConnectionCloseTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/myget", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/myget", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -69,17 +69,17 @@ public class HttpProducerConnectionCloseTest extends BaseHttpTest {
         HttpComponent component = context.getComponent("http", HttpComponent.class);
         component.setConnectionTimeToLive(1000L);
         HttpEndpoint endpoint = (HttpEndpoint) component
-                .createEndpoint("http://" + localServer.getInetAddress().getHostName() + ":"
+                .createEndpoint("http://localhost:"
                                 + localServer.getLocalPort() + "/myget?headerFilterStrategy=#myFilter");
         HttpProducer producer = new HttpProducer(endpoint);
         Exchange exchange = producer.createExchange();
         exchange.getIn().setBody(null);
-        exchange.getIn().setHeader("connection", HTTP.CONN_CLOSE);
+        exchange.getIn().setHeader("connection", HeaderElements.CLOSE);
         producer.start();
         producer.process(exchange);
         producer.stop();
 
-        assertEquals(HTTP.CONN_CLOSE, exchange.getMessage().getHeader("connection"));
+        assertEquals(HeaderElements.CLOSE, exchange.getMessage().getHeader("connection"));
         assertExchange(exchange);
     }
 
@@ -89,7 +89,7 @@ public class HttpProducerConnectionCloseTest extends BaseHttpTest {
         registry.bind("myFilter", connectionCloseFilterStrategy);
     }
 
-    class ConnectionCloseHeaderFilter extends HttpHeaderFilterStrategy {
+    static class ConnectionCloseHeaderFilter extends HttpHeaderFilterStrategy {
         @Override
         protected void initialize() {
             super.initialize();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentLengthTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentLengthTest.java
index 0b2d2663ebf..7d0bfec9170 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentLengthTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentLengthTest.java
@@ -20,10 +20,10 @@ import java.io.ByteArrayInputStream;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.converter.stream.ByteArrayInputStreamCache;
-import org.apache.http.Header;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -47,8 +47,8 @@ public class HttpProducerContentLengthTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/content-streamed", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/content-streamed", (request, response, context) -> {
                     Header contentLengthHeader = request.getFirstHeader(Exchange.CONTENT_LENGTH);
                     String contentLength = contentLengthHeader != null ? contentLengthHeader.getValue() : "";
                     Header transferEncodingHeader = request.getFirstHeader(Exchange.TRANSFER_ENCODING);
@@ -57,9 +57,9 @@ public class HttpProducerContentLengthTest extends BaseHttpTest {
                     //Request Body Chunked if no Content-Length set.
                     assertEquals("", contentLength);
                     assertEquals("chunked", transferEncoding);
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setCode(HttpStatus.SC_OK);
                 })
-                .registerHandler("/content-not-streamed", (request, response, context) -> {
+                .register("/content-not-streamed", (request, response, context) -> {
                     Header contentLengthHeader = request.getFirstHeader(Exchange.CONTENT_LENGTH);
                     String contentLength = contentLengthHeader != null ? contentLengthHeader.getValue() : "";
                     Header transferEncodingHeader = request.getFirstHeader(Exchange.TRANSFER_ENCODING);
@@ -68,13 +68,13 @@ public class HttpProducerContentLengthTest extends BaseHttpTest {
                     //Content-Length should match byte array
                     assertEquals("35", contentLength);
                     assertEquals("", transferEncoding);
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setCode(HttpStatus.SC_OK);
                 })
                 .create();
 
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
 
     }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeTest.java
index 898ed0ee80d..12e0972cfe2 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeTest.java
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.http;
 
+import java.nio.charset.StandardCharsets;
+
 import org.apache.camel.Exchange;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -45,18 +47,18 @@ public class HttpProducerContentTypeTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/content", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/content", (request, response, context) -> {
                     String contentType = request.getFirstHeader(Exchange.CONTENT_TYPE).getValue();
 
                     assertEquals(CONTENT_TYPE, contentType);
 
-                    response.setEntity(new StringEntity(contentType, "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setEntity(new StringEntity(contentType, StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
                 }).create();
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
     }
 
     @AfterEach
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeWithSemiColonTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeWithSemiColonTest.java
index b49eabbb6dd..a57dd936428 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeWithSemiColonTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerContentTypeWithSemiColonTest.java
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.http;
 
+import java.nio.charset.StandardCharsets;
+
 import org.apache.camel.Exchange;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -45,18 +47,18 @@ public class HttpProducerContentTypeWithSemiColonTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/content", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/content", (request, response, context) -> {
                     String contentType = request.getFirstHeader(Exchange.CONTENT_TYPE).getValue();
 
                     assertEquals(CONTENT_TYPE.replace(";", "; "), contentType);
 
-                    response.setEntity(new StringEntity(contentType, "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setEntity(new StringEntity(contentType, StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
                 }).create();
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
     }
 
     @AfterEach
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerCustomHeaderTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerCustomHeaderTest.java
index 3035c466747..8e2335b96e5 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerCustomHeaderTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerCustomHeaderTest.java
@@ -21,14 +21,13 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.HeaderValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-import static org.apache.http.HttpHeaders.HOST;
-
 public class HttpProducerCustomHeaderTest extends BaseHttpTest {
 
     private static final String CUSTOM_HOST = "test";
@@ -39,18 +38,19 @@ public class HttpProducerCustomHeaderTest extends BaseHttpTest {
     @Override
     public void setUp() throws Exception {
         Map<String, String> expectedHeaders = new HashMap<>();
-        expectedHeaders.put(HOST, CUSTOM_HOST);
+        expectedHeaders.put(HttpHeaders.HOST, CUSTOM_HOST);
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("*",
+                .setSslContext(getSSLContext())
+                .registerVirtual(CUSTOM_HOST, "*",
                         new HeaderValidationHandler(
                                 "GET",
-                                "customHostHeader=" + CUSTOM_HOST,
+                                null,
                                 null,
                                 getExpectedContent(),
                                 expectedHeaders))
-                .registerHandler("*",
+                .register("*",
                         new HeaderValidationHandler(
                                 "GET",
                                 null,
@@ -81,8 +81,8 @@ public class HttpProducerCustomHeaderTest extends BaseHttpTest {
         component.setConnectionTimeToLive(1000L);
 
         HttpEndpoint endpoint = (HttpEndpoint) component
-                .createEndpoint("http://" + localServer.getInetAddress().getHostName() + ":"
-                                + localServer.getLocalPort() + "/myget?customHostHeader=" + CUSTOM_HOST);
+                .createEndpoint(
+                        "http://localhost:" + localServer.getLocalPort() + "/myget?customHostHeader=" + CUSTOM_HOST);
         HttpProducer producer = new HttpProducer(endpoint);
 
         Exchange exchange = producer.createExchange();
@@ -102,7 +102,7 @@ public class HttpProducerCustomHeaderTest extends BaseHttpTest {
         component.setConnectionTimeToLive(1000L);
 
         HttpEndpoint endpoint
-                = (HttpEndpoint) component.createEndpoint("http://" + localServer.getInetAddress().getHostName() + ":"
+                = (HttpEndpoint) component.createEndpoint("http://localhost:"
                                                           + localServer.getLocalPort() + "/myget");
         HttpProducer producer = new HttpProducer(endpoint);
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerExplicitConnectionCloseTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerExplicitConnectionCloseTest.java
index 519c3f829ab..f6afd7c5c15 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerExplicitConnectionCloseTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerExplicitConnectionCloseTest.java
@@ -16,13 +16,11 @@
  */
 package org.apache.camel.component.http;
 
-import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.protocol.HTTP;
+import org.apache.hc.core5.http.HeaderElements;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -35,9 +33,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
  */
 public class HttpProducerExplicitConnectionCloseTest extends BaseHttpTest {
 
-    @EndpointInject("mock:result")
-    protected MockEndpoint mockResultEndpoint;
-
     private HttpServer localServer;
 
     @BeforeEach
@@ -45,8 +40,8 @@ public class HttpProducerExplicitConnectionCloseTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/myget", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/myget", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -67,7 +62,7 @@ public class HttpProducerExplicitConnectionCloseTest extends BaseHttpTest {
         HttpComponent component = context.getComponent("http", HttpComponent.class);
         component.setConnectionTimeToLive(1000L);
         HttpEndpoint endpoiont
-                = (HttpEndpoint) component.createEndpoint("http://" + localServer.getInetAddress().getHostName() + ":"
+                = (HttpEndpoint) component.createEndpoint("http://localhost:"
                                                           + localServer.getLocalPort() + "/myget?connectionClose=true");
         HttpProducer producer = new HttpProducer(endpoiont);
         Exchange exchange = producer.createExchange();
@@ -76,7 +71,7 @@ public class HttpProducerExplicitConnectionCloseTest extends BaseHttpTest {
         producer.process(exchange);
         producer.stop();
 
-        assertEquals(HTTP.CONN_CLOSE, exchange.getMessage().getHeader("connection"));
+        assertEquals(HeaderElements.CLOSE, exchange.getMessage().getHeader("connection"));
         assertExchange(exchange);
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerLoadManualIT.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerLoadManualIT.java
index f6160d20a60..217d7c5becf 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerLoadManualIT.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerLoadManualIT.java
@@ -26,8 +26,8 @@ import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.DrinkValidationHandler;
 import org.apache.camel.util.StopWatch;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Disabled;
@@ -49,8 +49,8 @@ public class HttpProducerLoadManualIT extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/echo", new DrinkValidationHandler(GET.name(), null, null, "myHeader")).create();
+                .setSslContext(getSSLContext())
+                .register("/echo", new DrinkValidationHandler(GET.name(), null, null, "myHeader")).create();
         localServer.start();
 
         super.setUp();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerRestartTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerRestartTest.java
index f2c4da439f7..5bd52a2b35a 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerRestartTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerRestartTest.java
@@ -16,12 +16,14 @@
  */
 package org.apache.camel.component.http;
 
+import java.nio.charset.StandardCharsets;
+
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -41,17 +43,17 @@ public class HttpProducerRestartTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/hello", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/hello", (request, response, context) -> {
                     Object agent = request.getFirstHeader("User-Agent").getValue();
                     assertEquals("MyAgent", agent);
 
-                    response.setEntity(new StringEntity("Bye World", "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setEntity(new StringEntity("Bye World", StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
                 }).create();
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
     }
 
     @AfterEach
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSelectMethodTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSelectMethodTest.java
index fa6bccfffdd..e8077050c54 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSelectMethodTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSelectMethodTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -46,14 +46,14 @@ public class HttpProducerSelectMethodTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/myget", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/mypost", new BasicValidationHandler(POST.name(), null, null, getExpectedContent()))
-                .registerHandler("/myget2", new BasicValidationHandler(GET.name(), "q=Camel", null, getExpectedContent()))
+                .setSslContext(getSSLContext())
+                .register("/myget", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/mypost", new BasicValidationHandler(POST.name(), null, null, getExpectedContent()))
+                .register("/myget2", new BasicValidationHandler(GET.name(), "q=Camel", null, getExpectedContent()))
                 .create();
         localServer.start();
 
-        baseUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        baseUrl = "http://localhost:" + localServer.getLocalPort();
 
     }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSessionTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSessionTest.java
index 06f527d7572..fdb8247e65b 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSessionTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerSessionTest.java
@@ -86,7 +86,7 @@ public class HttpProducerSessionTest extends CamelTestSupport {
 
     private String getTestServerEndpointSessionUrl() {
         // session handling will not work for localhost
-        return "http://127.0.0.1:" + PORT + "/session/";
+        return "http://localhost:" + PORT + "/session/";
     }
 
     @Override
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoHeadersWithSameKeyTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoHeadersWithSameKeyTest.java
index 7e51a9481eb..08f60ef9df7 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoHeadersWithSameKeyTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoHeadersWithSameKeyTest.java
@@ -16,15 +16,16 @@
  */
 package org.apache.camel.component.http;
 
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.camel.Exchange;
-import org.apache.http.Header;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -45,8 +46,8 @@ public class HttpProducerTwoHeadersWithSameKeyTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/myapp", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/myapp", (request, response, context) -> {
                     Header[] from = request.getHeaders("from");
                     assertEquals("me", from[0].getValue());
                     Header[] to = request.getHeaders("to");
@@ -55,9 +56,10 @@ public class HttpProducerTwoHeadersWithSameKeyTest extends BaseHttpTest {
                     response.setHeader("bar", "yes");
                     response.addHeader("foo", "123");
                     response.addHeader("foo", "456");
-                    response.setEntity(new StringEntity("OK", "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
-                }).registerHandler("/myapp", (request, response, context) -> {
+                    response.setEntity(new StringEntity("OK", StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
+                })
+                .register("/myapp", (request, response, context) -> {
                     Header[] from = request.getHeaders("from");
                     assertEquals("me", from[0].getValue());
                     Header[] to = request.getHeaders("to");
@@ -66,8 +68,8 @@ public class HttpProducerTwoHeadersWithSameKeyTest extends BaseHttpTest {
                     response.setHeader("bar", "yes");
                     response.addHeader("foo", "123");
                     response.addHeader("foo", "456");
-                    response.setEntity(new StringEntity("OK", "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setEntity(new StringEntity("OK", StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
                 }).create();
         localServer.start();
 
@@ -87,7 +89,7 @@ public class HttpProducerTwoHeadersWithSameKeyTest extends BaseHttpTest {
     @Test
     public void testTwoHeadersWithSameKeyHeader() throws Exception {
         String endpointUri
-                = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/myapp";
+                = "http://localhost:" + localServer.getLocalPort() + "/myapp";
 
         Exchange out = template.request(endpointUri, exchange -> {
             exchange.getIn().setBody(null);
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoParametersWithSameKeyTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoParametersWithSameKeyTest.java
index 762deb26d7f..19f43af21f1 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoParametersWithSameKeyTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerTwoParametersWithSameKeyTest.java
@@ -16,13 +16,14 @@
  */
 package org.apache.camel.component.http;
 
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 
 import org.apache.camel.Exchange;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -43,16 +44,16 @@ public class HttpProducerTwoParametersWithSameKeyTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/myapp", (request, response, context) -> {
-                    String uri = request.getRequestLine().getUri();
+                .setSslContext(getSSLContext())
+                .register("/myapp", (request, response, context) -> {
+                    String uri = request.getRequestUri();
                     assertEquals("/myapp?from=me&to=foo&to=bar", uri);
 
                     response.setHeader("bar", "yes");
                     response.addHeader("foo", "123");
                     response.addHeader("foo", "456");
-                    response.setEntity(new StringEntity("OK", "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setEntity(new StringEntity("OK", StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
                 }).create();
         localServer.start();
 
@@ -71,7 +72,7 @@ public class HttpProducerTwoParametersWithSameKeyTest extends BaseHttpTest {
 
     @Test
     public void testTwoParametersWithSameKey() throws Exception {
-        String endpointUri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+        String endpointUri = "http://localhost:" + localServer.getLocalPort()
                              + "/myapp?from=me&to=foo&to=bar";
 
         Exchange out = template.request(endpointUri, null);
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerUserAgentTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerUserAgentTest.java
index 3ef37accd5d..02576e3324c 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerUserAgentTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProducerUserAgentTest.java
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.http;
 
+import java.nio.charset.StandardCharsets;
+
 import org.apache.camel.Exchange;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -42,16 +44,16 @@ public class HttpProducerUserAgentTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/agent", (request, response, context) -> {
+                .setSslContext(getSSLContext())
+                .register("/agent", (request, response, context) -> {
                     String agent = request.getFirstHeader("User-Agent").getValue();
                     assertEquals("MyAgent", agent);
-                    response.setEntity(new StringEntity(agent, "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
+                    response.setEntity(new StringEntity(agent, StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
                 }).create();
         localServer.start();
 
-        endpointUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        endpointUrl = "http://localhost:" + localServer.getLocalPort();
 
         HttpComponent http = context.getComponent("http", HttpComponent.class);
         http.setUserAgent("MyAgent");
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyAndBasicAuthTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyAndBasicAuthTest.java
index 66b3e5dc526..473b8b6befe 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyAndBasicAuthTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyAndBasicAuthTest.java
@@ -16,32 +16,22 @@
  */
 package org.apache.camel.component.http;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.ProxyAndBasicAuthenticationValidationHandler;
-import org.apache.commons.codec.BinaryDecoder;
-import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.http.Header;
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.HttpStatus;
-import org.apache.http.ProtocolException;
-import org.apache.http.auth.AUTH;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.localserver.RequestBasicAuth;
-import org.apache.http.localserver.ResponseBasicUnauthorized;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.protocol.ResponseContent;
+import org.apache.camel.component.http.interceptor.RequestBasicAuth;
+import org.apache.camel.component.http.interceptor.RequestProxyBasicAuth;
+import org.apache.camel.component.http.interceptor.ResponseBasicUnauthorized;
+import org.apache.camel.component.http.interceptor.ResponseProxyBasicUnauthorized;
+import org.apache.hc.core5.http.HttpRequestInterceptor;
+import org.apache.hc.core5.http.HttpResponseInterceptor;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.ResponseContent;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -52,18 +42,18 @@ public class HttpProxyAndBasicAuthTest extends BaseHttpTest {
 
     private HttpServer proxy;
 
-    private String user = "camel";
-    private String password = "password";
-    private String proxyUser = "proxyuser";
-    private String proxyPassword = "proxypassword";
+    private final String user = "camel";
+    private final String password = "password";
+    private final String proxyUser = "proxyuser";
+    private final String proxyPassword = "proxypassword";
 
     @BeforeEach
     @Override
     public void setUp() throws Exception {
         proxy = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("*", new ProxyAndBasicAuthenticationValidationHandler(
+                .setSslContext(getSSLContext())
+                .registerVirtual("authtest.org", "*", new ProxyAndBasicAuthenticationValidationHandler(
                         GET.name(),
                         null, null, getExpectedContent(), user, password, proxyUser, proxyPassword))
                 .create();
@@ -92,13 +82,13 @@ public class HttpProxyAndBasicAuthTest extends BaseHttpTest {
         responseInterceptors.add(new ResponseContent());
         responseInterceptors.add(new ResponseProxyBasicUnauthorized());
         responseInterceptors.add(new ResponseBasicUnauthorized());
-        return new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
+        return new DefaultHttpProcessor(requestInterceptors, responseInterceptors);
     }
 
     @Test
     public void httpGetWithProxyAndUser() throws Exception {
-        Exchange exchange = template.request("http://authtest.org" + "?proxyAuthHost="
-                                             + getProxyHost() + "&proxyAuthPort=" + getProxyPort()
+        Exchange exchange = template.request("http://authtest.org" + "?proxyAuthHost=localhost"
+                                             + "&proxyAuthPort=" + proxy.getLocalPort()
                                              + "&proxyAuthUsername=" + proxyUser + "&proxyAuthPassword=" + proxyPassword
                                              + "&authUsername=" + user + "&authPassword=" + password,
                 exchange1 -> {
@@ -106,60 +96,4 @@ public class HttpProxyAndBasicAuthTest extends BaseHttpTest {
 
         assertExchange(exchange);
     }
-
-    private String getProxyHost() {
-        return proxy.getInetAddress().getHostName();
-    }
-
-    private String getProxyPort() {
-        return "" + proxy.getLocalPort();
-    }
-
-    private static class RequestProxyBasicAuth implements HttpRequestInterceptor {
-        @Override
-        public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
-            String auth = null;
-
-            String requestLine = request.getRequestLine().toString();
-            // assert we set a write GET URI
-            if (requestLine.contains("http://localhost")) {
-                throw new HttpException("Get a wrong proxy GET url");
-            }
-            Header h = request.getFirstHeader(AUTH.PROXY_AUTH_RESP);
-            if (h != null) {
-                String s = h.getValue();
-                if (s != null) {
-                    auth = s.trim();
-                }
-            }
-
-            if (auth != null) {
-                int i = auth.indexOf(' ');
-                if (i == -1) {
-                    throw new ProtocolException("Invalid Authorization header: " + auth);
-                }
-                String authscheme = auth.substring(0, i);
-                if (authscheme.equalsIgnoreCase("basic")) {
-                    String s = auth.substring(i + 1).trim();
-                    byte[] credsRaw = s.getBytes("ASCII");
-                    BinaryDecoder codec = new Base64();
-                    try {
-                        String creds = new String(codec.decode(credsRaw), "ASCII");
-                        context.setAttribute("proxy-creds", creds);
-                    } catch (DecoderException ex) {
-                        throw new ProtocolException("Malformed BASIC credentials");
-                    }
-                }
-            }
-        }
-    }
-
-    private static class ResponseProxyBasicUnauthorized implements HttpResponseInterceptor {
-        @Override
-        public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException {
-            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
-                response.addHeader(AUTH.PROXY_AUTH, "Basic realm=\"test realm\"");
-            }
-        }
-    }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyServerTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyServerTest.java
index 4440dc2075c..c95513810ff 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyServerTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpProxyServerTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.http;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -24,25 +23,16 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.HeaderValidationHandler;
+import org.apache.camel.component.http.interceptor.RequestProxyBasicAuth;
+import org.apache.camel.component.http.interceptor.ResponseProxyBasicUnauthorized;
 import org.apache.camel.util.URISupport;
-import org.apache.commons.codec.BinaryDecoder;
-import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.http.Header;
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.HttpStatus;
-import org.apache.http.ProtocolException;
-import org.apache.http.auth.AUTH;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.protocol.ResponseContent;
+import org.apache.hc.core5.http.HttpRequestInterceptor;
+import org.apache.hc.core5.http.HttpResponseInterceptor;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.ResponseContent;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -58,10 +48,13 @@ public class HttpProxyServerTest extends BaseHttpTest {
     @Override
     public void setUp() throws Exception {
         Map<String, String> expectedHeaders = new HashMap<>();
-        expectedHeaders.put("Proxy-Connection", "Keep-Alive");
+        // Don't test anymore the Proxy-Connection header as it is highly discouraged, so its support has been removed
+        // https://issues.apache.org/jira/browse/HTTPCLIENT-1957
+        //        expectedHeaders.put("Proxy-Connection", "Keep-Alive");
         proxy = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("*",
+                .setSslContext(getSSLContext())
+                .register("*",
                         new HeaderValidationHandler(GET.name(), null, null, getExpectedContent(), expectedHeaders))
                 .create();
         proxy.start();
@@ -86,7 +79,7 @@ public class HttpProxyServerTest extends BaseHttpTest {
         List<HttpResponseInterceptor> responseInterceptors = new ArrayList<>();
         responseInterceptors.add(new ResponseContent());
         responseInterceptors.add(new ResponseProxyBasicUnauthorized());
-        return new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
+        return new DefaultHttpProcessor(requestInterceptors, responseInterceptors);
     }
 
     @Test
@@ -109,7 +102,7 @@ public class HttpProxyServerTest extends BaseHttpTest {
     @Test
     public void httpGetWithProxyAndWithoutUser() throws Exception {
 
-        Exchange exchange = template.request("http://" + getProxyHost() + ":" + getProxyPort() + "?proxyAuthHost="
+        Exchange exchange = template.request("http://" + getHost() + ":" + getProxyPort() + "?proxyAuthHost="
                                              + getProxyHost() + "&proxyAuthPort=" + getProxyPort(),
                 exchange1 -> {
                 });
@@ -120,7 +113,7 @@ public class HttpProxyServerTest extends BaseHttpTest {
     @Test
     public void httpGetWithProxyAndWithoutUserTwo() throws Exception {
 
-        Exchange exchange = template.request("http://" + getProxyHost() + ":" + getProxyPort() + "?proxyHost=" + getProxyHost()
+        Exchange exchange = template.request("http://" + getHost() + ":" + getProxyPort() + "?proxyHost=" + getProxyHost()
                                              + "&proxyPort=" + getProxyPort(),
                 exchange1 -> {
                 });
@@ -134,7 +127,7 @@ public class HttpProxyServerTest extends BaseHttpTest {
         http.setProxyAuthHost(getProxyHost());
         http.setProxyAuthPort(Integer.parseInt(getProxyPort()));
 
-        Exchange exchange = template.request("http://" + getProxyHost() + ":" + getProxyPort(), exchange1 -> {
+        Exchange exchange = template.request("http://" + getHost() + ":" + getProxyPort(), exchange1 -> {
         });
 
         http.setProxyAuthHost(null);
@@ -143,59 +136,16 @@ public class HttpProxyServerTest extends BaseHttpTest {
         assertExchange(exchange);
     }
 
+    private String getHost() {
+        return "127.0.0.1";
+    }
+
     private String getProxyHost() {
-        return proxy.getInetAddress().getHostName();
+        return "localhost";
     }
 
     private String getProxyPort() {
         return "" + proxy.getLocalPort();
     }
 
-    private static class RequestProxyBasicAuth implements HttpRequestInterceptor {
-        @Override
-        public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
-            String auth = null;
-
-            String requestLine = request.getRequestLine().toString();
-            // assert we set a write GET URI
-            if (requestLine.contains("http://localhost")) {
-                throw new HttpException("Get a wrong proxy GET url");
-            }
-            Header h = request.getFirstHeader(AUTH.PROXY_AUTH_RESP);
-            if (h != null) {
-                String s = h.getValue();
-                if (s != null) {
-                    auth = s.trim();
-                }
-            }
-
-            if (auth != null) {
-                int i = auth.indexOf(' ');
-                if (i == -1) {
-                    throw new ProtocolException("Invalid Authorization header: " + auth);
-                }
-                String authscheme = auth.substring(0, i);
-                if (authscheme.equalsIgnoreCase("basic")) {
-                    String s = auth.substring(i + 1).trim();
-                    byte[] credsRaw = s.getBytes("ASCII");
-                    BinaryDecoder codec = new Base64();
-                    try {
-                        String creds = new String(codec.decode(credsRaw), "ASCII");
-                        context.setAttribute("proxy-creds", creds);
-                    } catch (DecoderException ex) {
-                        throw new ProtocolException("Malformed BASIC credentials");
-                    }
-                }
-            }
-        }
-    }
-
-    private static class ResponseProxyBasicUnauthorized implements HttpResponseInterceptor {
-        @Override
-        public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException {
-            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
-                response.addHeader(AUTH.PROXY_AUTH, "Basic realm=\"test realm\"");
-            }
-        }
-    }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryParameterTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryParameterTest.java
index 0559939a14c..5b37dd31e48 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryParameterTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryParameterTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.component.http;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.DrinkQueryValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -37,9 +37,9 @@ public class HttpQueryParameterTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/moes", new DrinkQueryValidationHandler(GET.name(), null, null, "drink"))
-                .registerHandler("/joes", new DrinkQueryValidationHandler(GET.name(), null, null, "drink")).create();
+                .setSslContext(getSSLContext())
+                .register("/moes", new DrinkQueryValidationHandler(GET.name(), null, null, "drink"))
+                .register("/joes", new DrinkQueryValidationHandler(GET.name(), null, null, "drink")).create();
         localServer.start();
 
         super.setUp();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryTest.java
index f466870681b..f7288bb6131 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpQueryTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -39,15 +39,15 @@ public class HttpQueryTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new BasicValidationHandler(GET.name(), "hl=en&q=camel", null, getExpectedContent()))
-                .registerHandler("/test/", new BasicValidationHandler(GET.name(), "my=@+camel", null, getExpectedContent()))
-                .registerHandler("/user/pass",
+                .setSslContext(getSSLContext())
+                .register("/", new BasicValidationHandler(GET.name(), "hl=en&q=camel", null, getExpectedContent()))
+                .register("/test/", new BasicValidationHandler(GET.name(), "my=@+camel", null, getExpectedContent()))
+                .register("/user/pass",
                         new BasicValidationHandler(GET.name(), "password=baa&username=foo", null, getExpectedContent()))
                 .create();
         localServer.start();
 
-        baseUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        baseUrl = "http://localhost:" + localServer.getLocalPort();
     }
 
     @AfterEach
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java
index 9831232909b..3014d8335c0 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java
@@ -21,21 +21,22 @@ import java.io.IOException;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
 import org.apache.camel.http.base.HttpOperationFailedException;
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.HttpRequestHandler;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.HttpRequestHandler;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.component.http.HttpMethods.GET;
 import static org.apache.camel.component.http.HttpMethods.POST;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
  *
@@ -49,11 +50,11 @@ public class HttpRedirectTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/someplaceelse", new BasicValidationHandler(GET.name(), null, null, "Bye World"))
-                .registerHandler("/redirectplace", new BasicValidationHandler(POST.name(), null, null, ""))
-                .registerHandler("/testPost", new RedirectPostHandler(308))
-                .registerHandler("/test", new RedirectHandler(HttpStatus.SC_MOVED_PERMANENTLY)).create();
+                .setSslContext(getSSLContext())
+                .register("/someplaceelse", new BasicValidationHandler(GET.name(), null, null, "Bye World"))
+                .register("/redirectplace", new BasicValidationHandler(POST.name(), null, null, ""))
+                .register("/testPost", new RedirectPostHandler(308))
+                .register("/test", new RedirectHandler(HttpStatus.SC_MOVED_PERMANENTLY)).create();
         localServer.start();
 
         super.setUp();
@@ -72,9 +73,9 @@ public class HttpRedirectTest extends BaseHttpTest {
     @Test
     public void httpRedirectFalse() throws Exception {
 
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
-                     + "/test?httpClient.redirectsEnabled=false&httpClient.socketTimeout=60000&httpClient.connectTimeout=60000"
-                     + "&httpClient.staleConnectionCheckEnabled=false";
+        String uri = "http://localhost:" + localServer.getLocalPort()
+                     + "/test?httpClient.redirectsEnabled=false&httpClient.responseTimeout=60000&httpClient.connectTimeout=60000"
+                     + "&httpConnection.validateAfterInactivity=-1";
         Exchange out = template.request(uri, exchange -> {
             // no data
         });
@@ -84,16 +85,16 @@ public class HttpRedirectTest extends BaseHttpTest {
         assertNotNull(cause);
         assertEquals(HttpStatus.SC_MOVED_PERMANENTLY, cause.getStatusCode());
         assertEquals(
-                "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/someplaceelse",
+                "http://localhost:" + localServer.getLocalPort() + "/someplaceelse",
                 cause.getRedirectLocation());
     }
 
     @Test
     public void httpHandleRedirect() throws Exception {
 
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
-                     + "/test?httpClient.socketTimeout=60000&httpClient.connectTimeout=60000"
-                     + "&httpClient.staleConnectionCheckEnabled=false&followRedirects=true";
+        String uri = "http://localhost:" + localServer.getLocalPort()
+                     + "/test?httpClient.responseTimeout=60000&httpClient.connectTimeout=60000"
+                     + "&httpConnection.validateAfterInactivity=-1&followRedirects=true";
         Exchange out = template.request(uri, exchange -> {
             // no data
         });
@@ -107,9 +108,9 @@ public class HttpRedirectTest extends BaseHttpTest {
     @Test
     public void httpHandleFollowRedirect() throws Exception {
 
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
-                     + "/testPost?httpClient.socketTimeout=60000&httpClient.connectTimeout=60000"
-                     + "&httpClient.staleConnectionCheckEnabled=false&followRedirects=true&httpMethod=POST";
+        String uri = "http://localhost:" + localServer.getLocalPort()
+                     + "/testPost?httpClient.responseTimeout=60000&httpClient.connectTimeout=60000"
+                     + "&httpConnection.validateAfterInactivity=-1&followRedirects=true&httpMethod=POST";
         Exchange out = template.request(uri, exchange -> {
             // no data
         });
@@ -126,9 +127,9 @@ public class HttpRedirectTest extends BaseHttpTest {
         HttpComponent component = context.getComponent("http", HttpComponent.class);
         component.setFollowRedirects(true);
         component.setConnectionTimeToLive(1000L);
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
-                     + "/testPost?httpClient.socketTimeout=60000&httpClient.connectTimeout=60000"
-                     + "&httpClient.staleConnectionCheckEnabled=false&httpMethod=POST";
+        String uri = "http://localhost:" + localServer.getLocalPort()
+                     + "/testPost?httpClient.responseTimeout=60000&httpClient.connectTimeout=60000"
+                     + "&httpConnection.validateAfterInactivity=-1&httpMethod=POST";
         HttpEndpoint httpEndpoint = (HttpEndpoint) component.createEndpoint(uri);
 
         Exchange out = template.request(httpEndpoint, exchange -> {
@@ -151,11 +152,11 @@ public class HttpRedirectTest extends BaseHttpTest {
         }
 
         @Override
-        public void handle(HttpRequest httpRequest, HttpResponse httpResponse, HttpContext httpContext)
+        public void handle(ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context)
                 throws HttpException, IOException {
-            httpResponse.setHeader("location", "http://" + localServer.getInetAddress().getHostName() + ":"
-                                               + localServer.getLocalPort() + "/someplaceelse");
-            httpResponse.setStatusCode(code);
+            response.setHeader("location", "http://localhost:"
+                                           + localServer.getLocalPort() + "/someplaceelse");
+            response.setCode(code);
         }
     }
 
@@ -168,11 +169,11 @@ public class HttpRedirectTest extends BaseHttpTest {
         }
 
         @Override
-        public void handle(HttpRequest httpRequest, HttpResponse httpResponse, HttpContext httpContext)
+        public void handle(ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context)
                 throws HttpException, IOException {
-            httpResponse.setHeader("location", "http://" + localServer.getInetAddress().getHostName() + ":"
-                                               + localServer.getLocalPort() + "/redirectplace");
-            httpResponse.setStatusCode(code);
+            response.setHeader("location", "http://localhost:"
+                                           + localServer.getLocalPort() + "/redirectplace");
+            response.setCode(code);
         }
     }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
index 9dc75325fd4..c5c31d89554 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
@@ -20,9 +20,9 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.http.common.DefaultHttpBinding;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.protocol.BasicHttpContext;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.core5.http.protocol.BasicHttpContext;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSOTimeoutTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSOTimeoutTest.java
index 7a1273e28b8..ea4a96cca47 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSOTimeoutTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSOTimeoutTest.java
@@ -18,8 +18,9 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.DelayValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.util.Timeout;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeEach;
@@ -37,8 +38,8 @@ public class HttpSOTimeoutTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new DelayValidationHandler(GET.name(), null, null, getExpectedContent(), 2000)).create();
+                .setSslContext(getSSLContext())
+                .register("/", new DelayValidationHandler(GET.name(), null, null, getExpectedContent(), 2000)).create();
         localServer.start();
 
         super.setUp();
@@ -56,8 +57,8 @@ public class HttpSOTimeoutTest extends BaseHttpTest {
 
     @Test
     public void httpGet() throws Exception {
-        Exchange exchange = template.request("http://" + localServer.getInetAddress().getHostName() + ":"
-                                             + localServer.getLocalPort() + "?httpClient.SocketTimeout=5000",
+        Exchange exchange = template.request("http://localhost:"
+                                             + localServer.getLocalPort() + "?httpClient.responseTimeout=5000",
                 exchange1 -> {
                 });
 
@@ -66,8 +67,8 @@ public class HttpSOTimeoutTest extends BaseHttpTest {
 
     @Test
     public void httpGetShouldThrowASocketTimeoutException() throws Exception {
-        Exchange reply = template.request("http://" + localServer.getInetAddress().getHostName() + ":"
-                                          + localServer.getLocalPort() + "?httpClient.SocketTimeout=1000",
+        Exchange reply = template.request("http://localhost:"
+                                          + localServer.getLocalPort() + "?httpClient.responseTimeout=1000",
                 exchange -> {
                 });
         Exception e = reply.getException();
@@ -76,8 +77,8 @@ public class HttpSOTimeoutTest extends BaseHttpTest {
 
     @Test
     public void httpGetUriOption() throws Exception {
-        HttpEndpoint endpoint = context.getEndpoint("http://" + localServer.getInetAddress().getHostName() + ":"
-                                                    + localServer.getLocalPort() + "?socketTimeout=5000",
+        HttpEndpoint endpoint = context.getEndpoint("http://localhost:"
+                                                    + localServer.getLocalPort() + "?responseTimeout=5000",
                 HttpEndpoint.class);
         Exchange exchange = template.request(endpoint,
                 exchange1 -> {
@@ -85,13 +86,13 @@ public class HttpSOTimeoutTest extends BaseHttpTest {
 
         assertExchange(exchange);
 
-        Assertions.assertEquals(5000, endpoint.getSocketTimeout());
+        Assertions.assertEquals(Timeout.ofSeconds(5), endpoint.getResponseTimeout());
     }
 
     @Test
     public void httpGetUriOptionShouldThrowASocketTimeoutException() throws Exception {
-        Exchange reply = template.request("http://" + localServer.getInetAddress().getHostName() + ":"
-                                          + localServer.getLocalPort() + "?socketTimeout=1000",
+        Exchange reply = template.request("http://localhost:"
+                                          + localServer.getLocalPort() + "?responseTimeout=1000",
                 exchange -> {
                 });
         Exception e = reply.getException();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareBasicAuthTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareBasicAuthTest.java
index 02827df9780..0cc9801c12a 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareBasicAuthTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareBasicAuthTest.java
@@ -22,8 +22,8 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.DrinkAuthValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -40,9 +40,8 @@ public class HttpSendDynamicAwareBasicAuthTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/moes", new DrinkAuthValidationHandler(GET.name(), null, null, "drink"))
-                .registerHandler("/joes", new DrinkAuthValidationHandler(GET.name(), null, null, "drink")).create();
+                .setSslContext(getSSLContext())
+                .register("/joes", new DrinkAuthValidationHandler(GET.name(), null, null, "drink")).create();
 
         localServer.start();
 
@@ -76,9 +75,11 @@ public class HttpSendDynamicAwareBasicAuthTest extends BaseHttpTest {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:moes")
-                        .toD("http://{{myUsername}}:{{myPassword}}@localhost:" + localServer.getLocalPort()
-                             + "/moes?authMethod=Basic&authenticationPreemptive=true&throwExceptionOnFailure=false&drink=${header.drink}");
+                // Providing the username and password as user info is considered as an HTTP protocol violation
+                // according to the RFC 7230, so its support has been removed
+                //                from("direct:moes")
+                //                        .toD("http://{{myUsername}}:{{myPassword}}@localhost:" + localServer.getLocalPort()
+                //                             + "/moes?authMethod=Basic&authenticationPreemptive=true&throwExceptionOnFailure=false&drink=${header.drink}");
 
                 from("direct:joes")
                         .toD("http://localhost:" + localServer.getLocalPort()
@@ -89,18 +90,15 @@ public class HttpSendDynamicAwareBasicAuthTest extends BaseHttpTest {
 
     @Test
     public void testDynamicAware() throws Exception {
-        String out = fluentTemplate.to("direct:moes").withHeader("drink", "beer").request(String.class);
-        assertEquals("Drinking beer", out);
-
-        out = fluentTemplate.to("direct:joes").withHeader("drink", "wine").request(String.class);
+        String out = fluentTemplate.to("direct:joes").withHeader("drink", "wine").request(String.class);
         assertEquals("Drinking wine", out);
 
-        // and there should be two http endpoint as they use different ways to configure username/password
+        // and there should be one http endpoint
         long count = context.getEndpoints().stream().filter(e -> e instanceof HttpEndpoint).count();
-        assertEquals(2, count);
+        assertEquals(1, count);
 
-        // we only have 2xdirect and 2xhttp
-        assertEquals(4, context.getEndpointRegistry().size());
+        // we only have one direct and one http
+        assertEquals(2, context.getEndpointRegistry().size());
     }
 
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareEmptyPathTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareEmptyPathTest.java
index 27b368f2887..76799777f60 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareEmptyPathTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareEmptyPathTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.component.http;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.DrinkValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -37,8 +37,8 @@ public class HttpSendDynamicAwareEmptyPathTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new DrinkValidationHandler(GET.name(), null, null, "drink")).create();
+                .setSslContext(getSSLContext())
+                .register("/", new DrinkValidationHandler(GET.name(), null, null, "drink")).create();
         localServer.start();
 
         super.setUp();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareHeadersTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareHeadersTest.java
index bec5de6a7ef..2f2625c075d 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareHeadersTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareHeadersTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -38,8 +38,8 @@ public class HttpSendDynamicAwareHeadersTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/dynamicAware", new BasicValidationHandler(GET.name(), "par1=val1&par2=val2", null, null))
+                .setSslContext(getSSLContext())
+                .register("/dynamicAware", new BasicValidationHandler(GET.name(), "par1=val1&par2=val2", null, null))
                 .create();
         localServer.start();
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwarePathHeaderTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwarePathHeaderTest.java
index e4014478442..e288ea3e67a 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwarePathHeaderTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwarePathHeaderTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.DrinkValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -38,8 +38,8 @@ public class HttpSendDynamicAwarePathHeaderTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/mybar", new DrinkValidationHandler(GET.name(), null, null, "drink")).create();
+                .setSslContext(getSSLContext())
+                .register("/mybar", new DrinkValidationHandler(GET.name(), null, null, "drink")).create();
         localServer.start();
 
         super.setUp();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawParameterTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawParameterTest.java
index 0ea7aa021e0..c949250460c 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawParameterTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawParameterTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -39,9 +39,8 @@ public class HttpSendDynamicAwareRawParameterTest extends BaseHttpTest {
                 .setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy())
                 .setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier())
                 .setSslContext(getSSLContext())
-                .registerHandler("/dynamicAware", new BasicValidationHandler("GET", "par1=val1&par2=val2", null, null))
+                .register("/dynamicAware", new BasicValidationHandler("GET", "par1=val1&par2=val2", null, null))
                 .create();
         localServer.start();
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawTest.java
index 3445929cb17..415fbe8db44 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareRawTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.DrinkValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -42,9 +42,9 @@ public class HttpSendDynamicAwareRawTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/moes", new DrinkValidationHandler(GET.name(), "drink=beer&password=se+%ret", null, "drink"))
-                .registerHandler("/joes",
+                .setSslContext(getSSLContext())
+                .register("/moes", new DrinkValidationHandler(GET.name(), "drink=beer&password=se+%ret", null, "drink"))
+                .register("/joes",
                         new DrinkValidationHandler(GET.name(), "drink=wine&password=se+%ret.$", null, "drink"))
                 .create();
         localServer.start();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareTest.java
index 2d994d76452..b5fdf6a38fc 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.component.http;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.DrinkValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -38,9 +38,9 @@ public class HttpSendDynamicAwareTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/moes", new DrinkValidationHandler(GET.name(), null, null, "drink"))
-                .registerHandler("/joes", new DrinkValidationHandler(GET.name(), null, null, "drink")).create();
+                .setSslContext(getSSLContext())
+                .register("/moes", new DrinkValidationHandler(GET.name(), null, null, "drink"))
+                .register("/joes", new DrinkValidationHandler(GET.name(), null, null, "drink")).create();
         localServer.start();
 
         super.setUp();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithSpacesTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithSpacesTest.java
index 8c6614910a1..6f10465f0bf 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithSpacesTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithSpacesTest.java
@@ -23,8 +23,8 @@ import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.ExchangeBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -41,8 +41,8 @@ public class HttpSendDynamicAwareUriWithSpacesTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/users/*", new BasicValidationHandler("GET", null, null, "a user")).create();
+                .setSslContext(getSSLContext())
+                .register("/users/*", new BasicValidationHandler("GET", null, null, "a user")).create();
         localServer.start();
 
         super.setUp();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java
index 8c00cca6d1e..6c1b3446faa 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java
@@ -23,8 +23,8 @@ import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.ExchangeBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -41,8 +41,8 @@ public class HttpSendDynamicAwareUriWithoutSlashTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/users/*", new BasicValidationHandler("GET", null, null, "a user")).create();
+                .setSslContext(getSSLContext())
+                .register("/users/*", new BasicValidationHandler("GET", null, null, "a user")).create();
         localServer.start();
 
         super.setUp();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpServerTestSupport.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpServerTestSupport.java
index ea08ffaf906..8df4d9ed17b 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpServerTestSupport.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpServerTestSupport.java
@@ -19,10 +19,10 @@ package org.apache.camel.component.http;
 import javax.net.ssl.SSLContext;
 
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.apache.http.ConnectionReuseStrategy;
-import org.apache.http.HttpResponseFactory;
-import org.apache.http.protocol.HttpExpectationVerifier;
-import org.apache.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.ConnectionReuseStrategy;
+import org.apache.hc.core5.http.HttpResponseFactory;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
 
 /**
  * Abstract base class for unit testing using a http server. This class contains an empty configuration to be used.
@@ -39,7 +39,7 @@ public abstract class HttpServerTestSupport extends CamelTestSupport {
     }
 
     /**
-     * Returns the org.apache.http.ConnectionReuseStrategy which should be used by the server.
+     * Returns the org.apache.hc.core5.http.ConnectionReuseStrategy which should be used by the server.
      *
      * @return connectionReuseStrategy
      */
@@ -48,20 +48,11 @@ public abstract class HttpServerTestSupport extends CamelTestSupport {
     }
 
     /**
-     * Returns the org.apache.http.HttpResponseFactory which should be used by the server.
+     * Returns the org.apache.hc.core5.http.HttpResponseFactory which should be used by the server.
      *
      * @return httpResponseFactory
      */
-    protected HttpResponseFactory getHttpResponseFactory() {
-        return null;
-    }
-
-    /**
-     * Returns the org.apache.http.protocol.HttpExpectationVerifier which should be used by the server.
-     *
-     * @return httpExpectationVerifier
-     */
-    protected HttpExpectationVerifier getHttpExpectationVerifier() {
+    protected HttpResponseFactory<ClassicHttpResponse> getHttpResponseFactory() {
         return null;
     }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java
index 27af50bdae0..511d852ba77 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSetHeaderIdsTest.java
@@ -21,9 +21,9 @@ import java.util.List;
 import org.apache.camel.Exchange;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeEach;
@@ -38,10 +38,10 @@ public class HttpSetHeaderIdsTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/myids", (httpRequest, httpResponse, httpContext) -> {
+                .setSslContext(getSSLContext())
+                .register("/myids", (httpRequest, httpResponse, httpContext) -> {
                     Assertions.assertNull(httpRequest.getFirstHeader("ids"));
-                    String u = httpRequest.getRequestLine().getUri();
+                    String u = httpRequest.getRequestUri();
                     httpResponse.setEntity(new StringEntity(u));
                 }).create();
         localServer.start();
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSquareBracketTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSquareBracketTest.java
index 9571b73a210..0627f0b757f 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSquareBracketTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSquareBracketTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -39,15 +39,15 @@ public class HttpSquareBracketTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/",
+                .setSslContext(getSSLContext())
+                .register("/",
                         new BasicValidationHandler(
                                 GET.name(), "country=dk&filter[end-date]=2022-12-31&filter[start-date]=2022-01-01", null,
                                 getExpectedContent()))
                 .create();
         localServer.start();
 
-        baseUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        baseUrl = "http://localhost:" + localServer.getLocalPort();
     }
 
     @AfterEach
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java
index 1dcd41f95dc..c524772c0be 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java
@@ -22,9 +22,9 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
 import org.apache.camel.http.base.HttpOperationFailedException;
-import org.apache.http.HttpStatus;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -46,11 +46,11 @@ public class HttpThrowExceptionOnFailureTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
-        baseUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        baseUrl = "http://localhost:" + localServer.getLocalPort();
 
         super.setUp();
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
index 708782a1161..1145590bf3f 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -39,23 +39,23 @@ public class HttpToDSOTimeoutTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/foo",
+                .setSslContext(getSSLContext())
+                .register("/foo",
                         new BasicValidationHandler(
                                 "/foo", GET.name(), null, null,
                                 getExpectedContent()))
-                .registerHandler("/bar",
+                .register("/bar",
                         new BasicValidationHandler(
                                 "/bar", GET.name(), null, null,
                                 getExpectedContent()))
-                .registerHandler("/baz",
+                .register("/baz",
                         new BasicValidationHandler(
                                 "/baz", GET.name(), null, null,
                                 getExpectedContent()))
                 .create();
         localServer.start();
 
-        baseUrl = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort();
+        baseUrl = "http://localhost:" + localServer.getLocalPort();
 
         super.setUp();
     }
@@ -100,13 +100,13 @@ public class HttpToDSOTimeoutTest extends BaseHttpTest {
             @Override
             public void configure() throws Exception {
                 from("direct:to")
-                        .to(baseUrl + "/foo?httpClient.SocketTimeout=5000");
+                        .to(baseUrl + "/foo?httpClient.responseTimeout=5000");
 
                 from("direct:toD")
-                        .toD(baseUrl + "/bar?httpClient.SocketTimeout=5000");
+                        .toD(baseUrl + "/bar?httpClient.responseTimeout=5000");
 
                 from("direct:toDoff")
-                        .toD().allowOptimisedComponents(false).uri(baseUrl + "/baz?httpClient.SocketTimeout=5000");
+                        .toD().allowOptimisedComponents(false).uri(baseUrl + "/baz?httpClient.responseTimeout=5000");
             }
         };
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpWithHttpUriHeaderTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpWithHttpUriHeaderTest.java
index 7e3bd63d5de..62cc50a52db 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpWithHttpUriHeaderTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpWithHttpUriHeaderTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -35,8 +35,8 @@ public class HttpWithHttpUriHeaderTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -56,7 +56,7 @@ public class HttpWithHttpUriHeaderTest extends BaseHttpTest {
     public void notBridgeEndpointWithDefault() throws Exception {
 
         Exchange exchange = template.request("http://host/", exchange1 -> exchange1.getIn().setHeader(Exchange.HTTP_URI,
-                "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/"));
+                "http://localhost:" + localServer.getLocalPort() + "/"));
         assertExchange(exchange);
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsAuthenticationTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsAuthenticationTest.java
index 0cc7ba84d2b..2ce323579d8 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsAuthenticationTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsAuthenticationTest.java
@@ -22,17 +22,17 @@ import java.util.List;
 import org.apache.camel.BindToRegistry;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.AuthenticationValidationHandler;
+import org.apache.camel.component.http.interceptor.RequestBasicAuth;
+import org.apache.camel.component.http.interceptor.ResponseBasicUnauthorized;
 import org.apache.camel.support.jsse.SSLContextParameters;
-import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.localserver.RequestBasicAuth;
-import org.apache.http.localserver.ResponseBasicUnauthorized;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.protocol.ResponseContent;
+import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
+import org.apache.hc.core5.http.HttpRequestInterceptor;
+import org.apache.hc.core5.http.HttpResponseInterceptor;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.ResponseContent;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -41,8 +41,8 @@ import static org.apache.camel.component.http.HttpMethods.GET;
 
 public class HttpsAuthenticationTest extends BaseHttpsTest {
 
-    private String user = "camel";
-    private String password = "password";
+    private final String user = "camel";
+    private final String password = "password";
     private HttpServer localServer;
 
     @BindToRegistry("x509HostnameVerifier")
@@ -56,8 +56,8 @@ public class HttpsAuthenticationTest extends BaseHttpsTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/",
+                .setSslContext(getSSLContext())
+                .register("/",
                         new AuthenticationValidationHandler(GET.name(), null, null, getExpectedContent(), user, password))
                 .create();
         localServer.start();
@@ -78,7 +78,7 @@ public class HttpsAuthenticationTest extends BaseHttpsTest {
     @Test
     public void httpsGetWithAuthentication() throws Exception {
 
-        Exchange exchange = template.request("https://127.0.0.1:" + localServer.getLocalPort()
+        Exchange exchange = template.request("https://localhost:" + localServer.getLocalPort()
                                              + "/?authUsername=camel&authPassword=password&x509HostnameVerifier=#x509HostnameVerifier&sslContextParameters=#sslContextParameters",
                 exchange1 -> {
                 });
@@ -94,6 +94,6 @@ public class HttpsAuthenticationTest extends BaseHttpsTest {
         responseInterceptors.add(new ResponseContent());
         responseInterceptors.add(new ResponseBasicUnauthorized());
 
-        return new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
+        return new DefaultHttpProcessor(requestInterceptors, responseInterceptors);
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsGetTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsGetTest.java
index b0134aa0385..5a2986f99ac 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsGetTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsGetTest.java
@@ -20,9 +20,9 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
 import org.apache.camel.support.jsse.SSLContextParameters;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -44,8 +44,8 @@ public class HttpsGetTest extends BaseHttpsTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/mail/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/mail/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -64,7 +64,7 @@ public class HttpsGetTest extends BaseHttpsTest {
     @Test
     public void httpsGet() throws Exception {
 
-        Exchange exchange = template.request("https://127.0.0.1:" + localServer.getLocalPort()
+        Exchange exchange = template.request("https://localhost:" + localServer.getLocalPort()
                                              + "/mail/?x509HostnameVerifier=#x509HostnameVerifier&sslContextParameters=#sslContextParameters",
                 exchange1 -> {
                 });
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsProducerWithSystemPropertiesTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsProducerWithSystemPropertiesTest.java
index 3f9852d137d..76926a86ae7 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsProducerWithSystemPropertiesTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsProducerWithSystemPropertiesTest.java
@@ -27,10 +27,10 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
 import org.apache.camel.component.http.handler.HeaderValidationHandler;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.ssl.SSLContexts;
+import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.ssl.SSLContexts;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
@@ -41,8 +41,8 @@ import static org.apache.camel.component.http.HttpMethods.GET;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
- * If SSLContext is created via system properties, is is cached. Automatically created next sslContext (with different
- * system properties) contains values from the first creation. Therefore it is not possible to create different test,
+ * If SSLContext is created via system properties, is cached. Automatically created next sslContext (with different
+ * system properties) contains values from the first creation. Therefore, it is not possible to create different test,
  * which uses systemProperties without forked JVM.
  */
 public class HttpsProducerWithSystemPropertiesTest extends BaseHttpTest {
@@ -97,10 +97,10 @@ public class HttpsProducerWithSystemPropertiesTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(sslcontext)
+                .setSslContext(sslcontext)
                 .setSslSetupHandler(socket -> socket.setNeedClientAuth(true))
-                .registerHandler("/mail/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
-                .registerHandler("/header/",
+                .register("/mail/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/header/",
                         new HeaderValidationHandler(GET.name(), null, null, getExpectedContent(), expectedHeaders))
                 .create();
         localServer.start();
@@ -120,7 +120,7 @@ public class HttpsProducerWithSystemPropertiesTest extends BaseHttpTest {
     @Test
     public void httpGetWithProxyFromSystemProperties() throws Exception {
 
-        String endpointUri = "https://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort()
+        String endpointUri = "https://localhost:" + localServer.getLocalPort()
                              + "/header/?x509HostnameVerifier=x509HostnameVerifier&useSystemProperties=true";
         Exchange exchange = template.request(endpointUri, exchange1 -> {
         });
@@ -130,7 +130,7 @@ public class HttpsProducerWithSystemPropertiesTest extends BaseHttpTest {
 
     @Test
     public void testTwoWaySuccessfull() throws Exception {
-        Exchange exchange = template.request("https://127.0.0.1:" + localServer.getLocalPort()
+        Exchange exchange = template.request("https://localhost:" + localServer.getLocalPort()
                                              + "/mail/?x509HostnameVerifier=x509HostnameVerifier&useSystemProperties=true",
                 exchange1 -> {
                 });
@@ -140,7 +140,7 @@ public class HttpsProducerWithSystemPropertiesTest extends BaseHttpTest {
 
     @Test
     public void testTwoWayFailure() throws Exception {
-        Exchange exchange = template.request("https://127.0.0.1:" + localServer.getLocalPort()
+        Exchange exchange = template.request("https://localhost:" + localServer.getLocalPort()
                                              + "/mail/?x509HostnameVerifier=x509HostnameVerifier",
                 exchange1 -> {
                 });
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsSslContextParametersGetTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsSslContextParametersGetTest.java
index 268679059d3..d2233741e76 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsSslContextParametersGetTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsSslContextParametersGetTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.http;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -35,8 +35,8 @@ public class HttpsSslContextParametersGetTest extends HttpsGetTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/mail/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
+                .setSslContext(getSSLContext())
+                .register("/mail/", new BasicValidationHandler(GET.name(), null, null, getExpectedContent())).create();
         localServer.start();
 
         super.setUp();
@@ -56,7 +56,7 @@ public class HttpsSslContextParametersGetTest extends HttpsGetTest {
     @Test
     public void httpsGet() throws Exception {
 
-        Exchange exchange = template.request("https://127.0.0.1:" + localServer.getLocalPort()
+        Exchange exchange = template.request("https://localhost:" + localServer.getLocalPort()
                                              + "/mail/?x509HostnameVerifier=x509HostnameVerifier&sslContextParameters=#sslContextParameters",
                 exchange1 -> {
                 });
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoComponentsSslContextParametersGetTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoComponentsSslContextParametersGetTest.java
index 21f082203ac..d5c46bb28c1 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoComponentsSslContextParametersGetTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoComponentsSslContextParametersGetTest.java
@@ -20,9 +20,9 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.test.AvailablePortFinder;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -54,7 +54,7 @@ public class HttpsTwoComponentsSslContextParametersGetTest extends BaseHttpsTest
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).create();
+                .setSslContext(getSSLContext()).create();
         localServer.start();
 
         super.setUp();
@@ -77,7 +77,7 @@ public class HttpsTwoComponentsSslContextParametersGetTest extends BaseHttpsTest
 
     @Test
     public void httpsTwoDifferentSSLContextNotSupported() {
-        assertDoesNotThrow(() -> runTest());
+        assertDoesNotThrow(this::runTest);
     }
 
     private void runTest() throws Exception {
@@ -87,11 +87,11 @@ public class HttpsTwoComponentsSslContextParametersGetTest extends BaseHttpsTest
                 port2 = AvailablePortFinder.getNextAvailable();
 
                 from("direct:foo")
-                        .to("https-foo://127.0.0.1:" + localServer.getLocalPort()
+                        .to("https-foo://localhost:" + localServer.getLocalPort()
                             + "/mail?x509HostnameVerifier=#x509HostnameVerifier&sslContextParameters=#sslContextParameters");
 
                 from("direct:bar")
-                        .to("https-bar://127.0.0.1:" + port2
+                        .to("https-bar://localhost:" + port2
                             + "/mail?x509HostnameVerifier=#x509HostnameVerifier&sslContextParameters=#sslContextParameters2");
             }
         });
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoDifferentSslContextParametersGetTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoDifferentSslContextParametersGetTest.java
index 800d789918b..85e6844ba85 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoDifferentSslContextParametersGetTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsTwoDifferentSslContextParametersGetTest.java
@@ -19,9 +19,9 @@ package org.apache.camel.component.http;
 import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.support.jsse.SSLContextParameters;
-import org.apache.http.conn.ssl.NoopHostnameVerifier;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Disabled;
@@ -50,7 +50,7 @@ public class HttpsTwoDifferentSslContextParametersGetTest extends BaseHttpsTest
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).create();
+                .setSslContext(getSSLContext()).create();
         localServer.start();
 
         super.setUp();
@@ -77,11 +77,11 @@ public class HttpsTwoDifferentSslContextParametersGetTest extends BaseHttpsTest
             @Override
             public void configure() throws Exception {
                 from("direct:foo")
-                        .to("https://127.0.0.1:" + localServer.getLocalPort()
+                        .to("https://localhost:" + localServer.getLocalPort()
                             + "/mail?x509HostnameVerifier=x509HostnameVerifier&sslContextParameters=#sslContextParameters");
 
                 from("direct:bar")
-                        .to("https://127.0.0.1:" + localServer.getLocalPort()
+                        .to("https://localhost:" + localServer.getLocalPort()
                             + "/mail?x509HostnameVerifier=x509HostnameVerifier&sslContextParameters=#sslContextParameters2");
             }
         });
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/ManagedHttpProducerPoolStatsTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/ManagedHttpProducerPoolStatsTest.java
index aae00192fc2..3f9d9f04bb4 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/ManagedHttpProducerPoolStatsTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/ManagedHttpProducerPoolStatsTest.java
@@ -16,14 +16,16 @@
  */
 package org.apache.camel.component.http;
 
+import java.nio.charset.StandardCharsets;
+
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.camel.Exchange;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -46,10 +48,10 @@ public class ManagedHttpProducerPoolStatsTest extends BaseHttpTest {
     public void setUp() throws Exception {
         localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
                 .setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-                .setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
-                .registerHandler("/myapp", (request, response, context) -> {
-                    response.setEntity(new StringEntity("OK", "ASCII"));
-                    response.setStatusCode(HttpStatus.SC_OK);
+                .setSslContext(getSSLContext())
+                .register("/myapp", (request, response, context) -> {
+                    response.setEntity(new StringEntity("OK", StandardCharsets.US_ASCII));
+                    response.setCode(HttpStatus.SC_OK);
                 }).create();
         localServer.start();
 
@@ -71,7 +73,7 @@ public class ManagedHttpProducerPoolStatsTest extends BaseHttpTest {
         // turn on registering jmx always so the producer is also registered
         context.getManagementStrategy().getManagementAgent().setRegisterAlways(true);
 
-        String uri = "http://" + localServer.getInetAddress().getHostName() + ":" + localServer.getLocalPort() + "/myapp";
+        String uri = "http://localhost:" + localServer.getLocalPort() + "/myapp";
 
         Exchange out = template.request(uri, exchange -> exchange.getIn().setBody("Hello World"));
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/AuthenticationValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/AuthenticationValidationHandler.java
index 43ad0179f36..b83e18b068e 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/AuthenticationValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/AuthenticationValidationHandler.java
@@ -18,11 +18,11 @@ package org.apache.camel.component.http.handler;
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public class AuthenticationValidationHandler extends BasicValidationHandler {
 
@@ -40,11 +40,11 @@ public class AuthenticationValidationHandler extends BasicValidationHandler {
 
     @Override
     public void handle(
-            final HttpRequest request, final HttpResponse response,
+            final ClassicHttpRequest request, final ClassicHttpResponse response,
             final HttpContext context)
             throws HttpException, IOException {
         if (!getExpectedCredential().equals(context.getAttribute("creds"))) {
-            response.setStatusCode(HttpStatus.SC_UNAUTHORIZED);
+            response.setCode(HttpStatus.SC_UNAUTHORIZED);
             return;
         }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicRawQueryValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicRawQueryValidationHandler.java
index 9ef9b8b003d..de8dafa70c1 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicRawQueryValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicRawQueryValidationHandler.java
@@ -17,10 +17,9 @@
 package org.apache.camel.component.http.handler;
 
 import java.io.IOException;
-import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.apache.http.HttpRequest;
+import org.apache.hc.core5.http.ClassicHttpRequest;
 
 /**
  * Similar to {@link BasicValidationHandler} but validates the raw query instead.
@@ -33,9 +32,9 @@ public class BasicRawQueryValidationHandler extends BasicValidationHandler {
     }
 
     @Override
-    protected boolean validateQuery(HttpRequest request) throws IOException {
+    protected boolean validateQuery(ClassicHttpRequest request) throws IOException {
         try {
-            String query = new URI(request.getRequestLine().getUri()).getRawQuery();
+            String query = request.getUri().getRawQuery();
             if (expectedQuery != null && !expectedQuery.equals(query)) {
                 return false;
             }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicValidationHandler.java
index 186c02584b7..8a648b63846 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/BasicValidationHandler.java
@@ -17,19 +17,18 @@
 package org.apache.camel.component.http.handler;
 
 import java.io.IOException;
-import java.net.URI;
 import java.net.URISyntaxException;
-
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.HttpRequestHandler;
-import org.apache.http.util.EntityUtils;
+import java.nio.charset.StandardCharsets;
+
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.io.HttpRequestHandler;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.http.io.entity.StringEntity;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public class BasicValidationHandler implements HttpRequestHandler {
 
@@ -58,45 +57,45 @@ public class BasicValidationHandler implements HttpRequestHandler {
 
     @Override
     public void handle(
-            final HttpRequest request, final HttpResponse response,
+            final ClassicHttpRequest request, final ClassicHttpResponse response,
             final HttpContext context)
             throws HttpException, IOException {
 
-        if (expectedUri != null && !expectedUri.equals(request.getRequestLine().getUri())) {
-            response.setStatusCode(HttpStatus.SC_BAD_REQUEST);
+        if (expectedUri != null && !expectedUri.equals(request.getRequestUri())) {
+            response.setCode(HttpStatus.SC_BAD_REQUEST);
             return;
         }
 
-        if (expectedMethod != null && !expectedMethod.equals(request.getRequestLine().getMethod())) {
-            response.setStatusCode(HttpStatus.SC_METHOD_FAILURE);
+        if (expectedMethod != null && !expectedMethod.equals(request.getMethod())) {
+            response.setCode(HttpStatus.SC_METHOD_FAILURE);
             return;
         }
 
         if (!validateQuery(request)) {
-            response.setStatusCode(HttpStatus.SC_BAD_REQUEST);
+            response.setCode(HttpStatus.SC_BAD_REQUEST);
             return;
         }
 
         if (expectedContent != null) {
-            HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
+            HttpEntity entity = request.getEntity();
             String content = EntityUtils.toString(entity);
 
             if (!expectedContent.equals(content)) {
-                response.setStatusCode(HttpStatus.SC_BAD_REQUEST);
+                response.setCode(HttpStatus.SC_BAD_REQUEST);
                 return;
             }
         }
 
-        response.setStatusCode(HttpStatus.SC_OK);
+        response.setCode(HttpStatus.SC_OK);
         String content = buildResponse(request);
         if (content != null) {
-            response.setEntity(new StringEntity(content, "ASCII"));
+            response.setEntity(new StringEntity(content, StandardCharsets.US_ASCII));
         }
     }
 
-    protected boolean validateQuery(HttpRequest request) throws IOException {
+    protected boolean validateQuery(ClassicHttpRequest request) throws IOException {
         try {
-            String query = new URI(request.getRequestLine().getUri()).getQuery();
+            String query = request.getUri().getQuery();
             if (expectedQuery != null && !expectedQuery.equals(query)) {
                 return false;
             }
@@ -106,7 +105,7 @@ public class BasicValidationHandler implements HttpRequestHandler {
         return true;
     }
 
-    protected String buildResponse(HttpRequest request) {
+    protected String buildResponse(ClassicHttpRequest request) {
         return responseContent;
     }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DelayValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DelayValidationHandler.java
index 61e11e49dec..e5c9d4fc3ef 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DelayValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DelayValidationHandler.java
@@ -18,10 +18,10 @@ package org.apache.camel.component.http.handler;
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public class DelayValidationHandler extends BasicValidationHandler {
 
@@ -35,7 +35,7 @@ public class DelayValidationHandler extends BasicValidationHandler {
 
     @Override
     public void handle(
-            final HttpRequest request, final HttpResponse response,
+            final ClassicHttpRequest request, final ClassicHttpResponse response,
             final HttpContext context)
             throws HttpException, IOException {
         try {
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java
index 590ee5a60cb..48ae429ae9a 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java
@@ -18,10 +18,12 @@ package org.apache.camel.component.http.handler;
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.junit.jupiter.api.Assertions;
 
 public class DrinkAuthValidationHandler extends DrinkValidationHandler {
@@ -31,8 +33,11 @@ public class DrinkAuthValidationHandler extends DrinkValidationHandler {
     }
 
     @Override
-    public void handle(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException, IOException {
-        String auth = request.getFirstHeader("Authorization").getValue();
+    public void handle(ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context)
+            throws HttpException, IOException {
+        Header authorization = request.getFirstHeader(HttpHeaders.AUTHORIZATION);
+        Assertions.assertNotNull(authorization);
+        String auth = authorization.getValue();
         Assertions.assertTrue(auth.startsWith("Basic"));
         super.handle(request, response, context);
     }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkQueryValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkQueryValidationHandler.java
index 0af130335c6..e3e02450249 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkQueryValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkQueryValidationHandler.java
@@ -16,7 +16,7 @@
  */
 package org.apache.camel.component.http.handler;
 
-import org.apache.http.HttpRequest;
+import org.apache.hc.core5.http.ClassicHttpRequest;
 
 public class DrinkQueryValidationHandler extends BasicValidationHandler {
 
@@ -28,7 +28,11 @@ public class DrinkQueryValidationHandler extends BasicValidationHandler {
     }
 
     @Override
-    protected String buildResponse(HttpRequest request) {
-        return "Drinking " + request.getRequestLine().getUri();
+    protected String buildResponse(ClassicHttpRequest request) {
+        return "Drinking " + request.getRequestUri();
+    }
+
+    public String getName() {
+        return name;
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkValidationHandler.java
index b5ea060fe87..64fe5254a3a 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkValidationHandler.java
@@ -16,7 +16,7 @@
  */
 package org.apache.camel.component.http.handler;
 
-import org.apache.http.HttpRequest;
+import org.apache.hc.core5.http.ClassicHttpRequest;
 
 public class DrinkValidationHandler extends BasicValidationHandler {
 
@@ -28,7 +28,7 @@ public class DrinkValidationHandler extends BasicValidationHandler {
     }
 
     @Override
-    protected String buildResponse(HttpRequest request) {
+    protected String buildResponse(ClassicHttpRequest request) {
         return "Drinking " + request.getFirstHeader(header).getValue();
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/HeaderValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/HeaderValidationHandler.java
index 240e56b06f2..83b41f0d5db 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/HeaderValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/HeaderValidationHandler.java
@@ -21,12 +21,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.http.Header;
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public class HeaderValidationHandler extends BasicValidationHandler {
 
@@ -54,7 +54,7 @@ public class HeaderValidationHandler extends BasicValidationHandler {
 
     @Override
     public void handle(
-            final HttpRequest request, final HttpResponse response,
+            final ClassicHttpRequest request, final ClassicHttpResponse response,
             final HttpContext context)
             throws HttpException, IOException {
 
@@ -71,7 +71,7 @@ public class HeaderValidationHandler extends BasicValidationHandler {
                 }
 
                 if (!headerExist) {
-                    response.setStatusCode(HttpStatus.SC_EXPECTATION_FAILED);
+                    response.setCode(HttpStatus.SC_EXPECTATION_FAILED);
                     return;
                 }
             }
@@ -80,7 +80,7 @@ public class HeaderValidationHandler extends BasicValidationHandler {
         if (absentHeaders != null) {
             for (String header : absentHeaders) {
                 if (request.getHeaders(header).length > 0) {
-                    response.setStatusCode(HttpStatus.SC_EXPECTATION_FAILED);
+                    response.setCode(HttpStatus.SC_EXPECTATION_FAILED);
                     return;
                 }
             }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAndBasicAuthenticationValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAndBasicAuthenticationValidationHandler.java
index 272a511f0c7..4a324f436c9 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAndBasicAuthenticationValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAndBasicAuthenticationValidationHandler.java
@@ -18,11 +18,11 @@ package org.apache.camel.component.http.handler;
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public class ProxyAndBasicAuthenticationValidationHandler extends AuthenticationValidationHandler {
 
@@ -40,12 +40,12 @@ public class ProxyAndBasicAuthenticationValidationHandler extends Authentication
 
     @Override
     public void handle(
-            final HttpRequest request, final HttpResponse response,
+            final ClassicHttpRequest request, final ClassicHttpResponse response,
             final HttpContext context)
             throws HttpException, IOException {
 
         if (!getExpectedProxyCredential().equals(context.getAttribute("proxy-creds"))) {
-            response.setStatusCode(HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED);
+            response.setCode(HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED);
             return;
         }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAuthenticationValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAuthenticationValidationHandler.java
index 05cfe35f714..1290fa44c81 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAuthenticationValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/handler/ProxyAuthenticationValidationHandler.java
@@ -18,11 +18,11 @@ package org.apache.camel.component.http.handler;
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.ClassicHttpRequest;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public class ProxyAuthenticationValidationHandler extends BasicValidationHandler {
 
@@ -39,12 +39,12 @@ public class ProxyAuthenticationValidationHandler extends BasicValidationHandler
 
     @Override
     public void handle(
-            final HttpRequest request, final HttpResponse response,
+            final ClassicHttpRequest request, final ClassicHttpResponse response,
             final HttpContext context)
             throws HttpException, IOException {
 
         if (!getExpectedCredential().equals(context.getAttribute("proxy-creds"))) {
-            response.setStatusCode(HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED);
+            response.setCode(HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED);
             return;
         }
 
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/BasicAuthTokenExtractor.java b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/BasicAuthTokenExtractor.java
new file mode 100644
index 00000000000..4d92617eaee
--- /dev/null
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/BasicAuthTokenExtractor.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.http.interceptor;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.ProtocolException;
+
+public class BasicAuthTokenExtractor {
+
+    public String extract(final HttpRequest request) throws HttpException {
+        String auth = null;
+
+        Header h = request.getFirstHeader(HttpHeaders.AUTHORIZATION);
+        if (h != null) {
+            final String s = h.getValue();
+            if (s != null) {
+                auth = s.trim();
+            }
+        }
+
+        if (auth != null) {
+            final int i = auth.indexOf(' ');
+            if (i == -1) {
+                throw new ProtocolException("Invalid Authorization header: " + auth);
+            }
+            final String authscheme = auth.substring(0, i);
+            if (authscheme.equalsIgnoreCase("basic")) {
+                final String s = auth.substring(i + 1).trim();
+                byte[] credsRaw = s.getBytes(StandardCharsets.US_ASCII);
+                Base64.Decoder codec = Base64.getDecoder();
+                auth = new String(codec.decode(credsRaw), StandardCharsets.US_ASCII);
+            }
+        }
+        return auth;
+    }
+}
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpGetWithBodyMethod.java b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/RequestBasicAuth.java
similarity index 52%
rename from components/camel-http/src/main/java/org/apache/camel/component/http/HttpGetWithBodyMethod.java
rename to components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/RequestBasicAuth.java
index efa7cb57af1..c2d8ce2f00c 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpGetWithBodyMethod.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/RequestBasicAuth.java
@@ -14,29 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.http;
+package org.apache.camel.component.http.interceptor;
 
-import java.net.URI;
+import java.io.IOException;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.hc.core5.http.EntityDetails;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpRequestInterceptor;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
-public class HttpGetWithBodyMethod extends HttpEntityEnclosingRequestBase {
+public class RequestBasicAuth implements HttpRequestInterceptor {
 
-    public static final String METHOD_NAME = "GET";
+    private final BasicAuthTokenExtractor authTokenExtractor;
 
-    public HttpGetWithBodyMethod(String uri, HttpEntity entity) {
-        setURI(URI.create(uri));
-        setEntity(entity);
-    }
-
-    public HttpGetWithBodyMethod(URI uri, HttpEntity entity) {
-        setURI(uri);
-        setEntity(entity);
+    public RequestBasicAuth() {
+        this.authTokenExtractor = new BasicAuthTokenExtractor();
     }
 
     @Override
-    public String getMethod() {
-        return METHOD_NAME;
+    public void process(HttpRequest request, EntityDetails entity, HttpContext context) throws HttpException, IOException {
+        context.setAttribute("creds", this.authTokenExtractor.extract(request));
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/RequestProxyBasicAuth.java b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/RequestProxyBasicAuth.java
new file mode 100644
index 00000000000..db0f2f92e53
--- /dev/null
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/RequestProxyBasicAuth.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.http.interceptor;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+import org.apache.hc.core5.http.EntityDetails;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpRequestInterceptor;
+import org.apache.hc.core5.http.ProtocolException;
+import org.apache.hc.core5.http.protocol.HttpContext;
+
+public class RequestProxyBasicAuth implements HttpRequestInterceptor {
+    @Override
+    public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
+            throws HttpException, IOException {
+        String auth = null;
+
+        try {
+            String requestLine = request.getUri().toString();
+            // assert we set a write GET URI
+            if (requestLine.contains("http://localhost")) {
+                throw new HttpException("Get a wrong proxy GET url");
+            }
+        } catch (URISyntaxException e) {
+            throw new RuntimeException(e);
+        }
+        Header h = request.getFirstHeader(HttpHeaders.PROXY_AUTHORIZATION);
+        if (h != null) {
+            String s = h.getValue();
+            if (s != null) {
+                auth = s.trim();
+            }
+        }
+
+        if (auth != null) {
+            int i = auth.indexOf(' ');
+            if (i == -1) {
+                throw new ProtocolException("Invalid Authorization header: " + auth);
+            }
+            String authscheme = auth.substring(0, i);
+            if (authscheme.equalsIgnoreCase("basic")) {
+                String s = auth.substring(i + 1).trim();
+                byte[] credsRaw = s.getBytes(StandardCharsets.US_ASCII);
+                Base64.Decoder codec = Base64.getDecoder();
+                String creds = new String(codec.decode(credsRaw), StandardCharsets.US_ASCII);
+                context.setAttribute("proxy-creds", creds);
+            }
+        }
+    }
+}
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/ResponseBasicUnauthorized.java
similarity index 50%
copy from components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java
copy to components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/ResponseBasicUnauthorized.java
index 590ee5a60cb..9a723b811dc 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/ResponseBasicUnauthorized.java
@@ -14,26 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.http.handler;
+package org.apache.camel.component.http.interceptor;
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.protocol.HttpContext;
-import org.junit.jupiter.api.Assertions;
-
-public class DrinkAuthValidationHandler extends DrinkValidationHandler {
-
-    public DrinkAuthValidationHandler(String expectedMethod, String expectedQuery, Object expectedContent, String header) {
-        super(expectedMethod, expectedQuery, expectedContent, header);
-    }
+import org.apache.hc.core5.http.EntityDetails;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpResponseInterceptor;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
+public class ResponseBasicUnauthorized implements HttpResponseInterceptor {
     @Override
-    public void handle(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException, IOException {
-        String auth = request.getFirstHeader("Authorization").getValue();
-        Assertions.assertTrue(auth.startsWith("Basic"));
-        super.handle(request, response, context);
+    public void process(HttpResponse response, EntityDetails details, HttpContext context) throws HttpException, IOException {
+        if (response.getCode() == HttpStatus.SC_UNAUTHORIZED) {
+            if (!response.containsHeader(HttpHeaders.WWW_AUTHENTICATE)) {
+                response.addHeader(HttpHeaders.WWW_AUTHENTICATE, "Basic realm=\"test realm\"");
+            }
+        }
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/ResponseProxyBasicUnauthorized.java
similarity index 50%
copy from components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java
copy to components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/ResponseProxyBasicUnauthorized.java
index 590ee5a60cb..2ba6ff48b8f 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/handler/DrinkAuthValidationHandler.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/interceptor/ResponseProxyBasicUnauthorized.java
@@ -14,26 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.http.handler;
+package org.apache.camel.component.http.interceptor;
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.protocol.HttpContext;
-import org.junit.jupiter.api.Assertions;
-
-public class DrinkAuthValidationHandler extends DrinkValidationHandler {
-
-    public DrinkAuthValidationHandler(String expectedMethod, String expectedQuery, Object expectedContent, String header) {
-        super(expectedMethod, expectedQuery, expectedContent, header);
-    }
+import org.apache.hc.core5.http.EntityDetails;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpResponseInterceptor;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
+public class ResponseProxyBasicUnauthorized implements HttpResponseInterceptor {
     @Override
-    public void handle(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException, IOException {
-        String auth = request.getFirstHeader("Authorization").getValue();
-        Assertions.assertTrue(auth.startsWith("Basic"));
-        super.handle(request, response, context);
+    public void process(final HttpResponse response, final EntityDetails entity, final HttpContext context)
+            throws HttpException, IOException {
+        if (response.getCode() == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
+            response.addHeader(HttpHeaders.PROXY_AUTHENTICATE, "Basic realm=\"test realm\"");
+        }
     }
 }
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/rest/RestCamelComponentVerifierTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/rest/RestCamelComponentVerifierTest.java
index 98b846e5125..3dd49fcc119 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/rest/RestCamelComponentVerifierTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/rest/RestCamelComponentVerifierTest.java
@@ -24,14 +24,14 @@ import java.util.Map;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
 import org.apache.camel.component.http.BaseHttpTest;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
+import org.apache.camel.component.http.interceptor.RequestBasicAuth;
+import org.apache.camel.component.http.interceptor.ResponseBasicUnauthorized;
 import org.apache.camel.component.rest.RestComponent;
-import org.apache.http.impl.bootstrap.HttpServer;
-import org.apache.http.impl.bootstrap.ServerBootstrap;
-import org.apache.http.localserver.RequestBasicAuth;
-import org.apache.http.localserver.ResponseBasicUnauthorized;
-import org.apache.http.protocol.HttpProcessor;
-import org.apache.http.protocol.ImmutableHttpProcessor;
-import org.apache.http.protocol.ResponseContent;
+import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
+import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
+import org.apache.hc.core5.http.protocol.DefaultHttpProcessor;
+import org.apache.hc.core5.http.protocol.HttpProcessor;
+import org.apache.hc.core5.http.protocol.ResponseContent;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -53,7 +53,7 @@ public class RestCamelComponentVerifierTest extends BaseHttpTest {
 
         localServer = ServerBootstrap.bootstrap()
                 .setHttpProcessor(getHttpProcessor())
-                .registerHandler("/verify", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
+                .register("/verify", new BasicValidationHandler(GET.name(), null, null, getExpectedContent()))
                 .create();
 
         localServer.start();
@@ -83,7 +83,7 @@ public class RestCamelComponentVerifierTest extends BaseHttpTest {
     }
 
     private HttpProcessor getHttpProcessor() {
-        return new ImmutableHttpProcessor(
+        return new DefaultHttpProcessor(
                 Collections.singletonList(
                         new RequestBasicAuth()),
                 Arrays.asList(
@@ -97,9 +97,7 @@ public class RestCamelComponentVerifierTest extends BaseHttpTest {
 
     @SuppressWarnings("unused")
     protected String getLocalServerUri(String contextPath) {
-        return "http://"
-               + localServer.getInetAddress().getHostName()
-               + ":"
+        return "http://localhost:"
                + localServer.getLocalPort()
                + (contextPath != null
                        ? contextPath.startsWith("/") ? contextPath : "/" + contextPath