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

zhfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 7479f9ed2a Fix #3924 make sure the http client options working in 
native mode (#3925)
7479f9ed2a is described below

commit 7479f9ed2ab3954777a45ccab37113ca2f02d241
Author: Amos Feng <[email protected]>
AuthorDate: Wed Jul 20 15:42:48 2022 +0800

    Fix #3924 make sure the http client options working in native mode (#3925)
---
 .../apache/camel/quarkus/component/http/deployment/HttpProcessor.java  | 3 +++
 .../java/org/apache/camel/quarkus/component/http/it/HttpResource.java  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/extensions/http/deployment/src/main/java/org/apache/camel/quarkus/component/http/deployment/HttpProcessor.java
 
b/extensions/http/deployment/src/main/java/org/apache/camel/quarkus/component/http/deployment/HttpProcessor.java
index 7ce3951149..9db31fd2b1 100644
--- 
a/extensions/http/deployment/src/main/java/org/apache/camel/quarkus/component/http/deployment/HttpProcessor.java
+++ 
b/extensions/http/deployment/src/main/java/org/apache/camel/quarkus/component/http/deployment/HttpProcessor.java
@@ -21,6 +21,7 @@ import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import org.apache.http.client.config.RequestConfig;
 
 class HttpProcessor {
     public static final String FEATURE = "camel-http";
@@ -38,5 +39,7 @@ class HttpProcessor {
     @BuildStep
     void registerForReflection(BuildProducer<ReflectiveClassBuildItem> 
reflectiveClasses) {
         reflectiveClasses.produce(new ReflectiveClassBuildItem(true, false, 
"org.apache.camel.component.http.HttpMethods"));
+        reflectiveClasses.produce(new ReflectiveClassBuildItem(true, false, 
"org.apache.http.impl.client.HttpClientBuilder"));
+        reflectiveClasses.produce(new ReflectiveClassBuildItem(true, false, 
RequestConfig.Builder.class.getName()));
     }
 }
diff --git 
a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
 
b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
index 8caaac949a..35c786b547 100644
--- 
a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
+++ 
b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
@@ -73,7 +73,7 @@ public class HttpResource {
     @Produces(MediaType.TEXT_PLAIN)
     public String httpGet(@QueryParam("test-port") int port) {
         return producerTemplate
-                .toF("http://localhost:%d/service/get?bridgeEndpoint=true";, 
port)
+                
.toF("http://localhost:%d/service/get?bridgeEndpoint=true&connectTimeout=2000";, 
port)
                 .withHeader(Exchange.HTTP_METHOD, "GET")
                 .request(String.class);
     }

Reply via email to