You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/10/31 17:21:07 UTC

(camel) branch main updated: CAMEL-22638: jolokia plugin should accept message body for POST so hawtio can access data when connecting to camel-jbang

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 2e0bc04e76bc CAMEL-22638: jolokia plugin should accept message body for POST so hawtio can access data when connecting to camel-jbang
2e0bc04e76bc is described below

commit 2e0bc04e76bc4e16f6e285a68fc7e23581a349ac
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Oct 31 18:20:49 2025 +0100

    CAMEL-22638: jolokia plugin should accept message body for POST so hawtio can access data when connecting to camel-jbang
---
 .../camel/component/platform/http/main/ManagementHttpServer.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
index 23a35f56fd94..523078705f9c 100644
--- a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
+++ b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
@@ -658,8 +658,9 @@ public class ManagementHttpServer extends ServiceSupport implements CamelContext
                         "JolokiaPlatformHttpPlugin not found. Add camel-platform-http-jolokia dependency."));
 
         Route jolokia = router.route(jolokiaPath + "/*");
-        jolokia.method(HttpMethod.GET);
-        jolokia.method(HttpMethod.POST);
+        jolokia.method(HttpMethod.GET).method(HttpMethod.POST)
+                // need body handler to accept POST data
+                .handler(BodyHandler.create(false));
 
         Handler<RoutingContext> handler = (Handler<RoutingContext>) jolokiaPlugin.getHandler();
         jolokia.handler(new BlockingHandlerDecorator(handler, true));