davsclaus commented on code in PR #24667:
URL: https://github.com/apache/camel/pull/24667#discussion_r3572947083
##########
components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java:
##########
@@ -1083,6 +1085,19 @@ public void handle(RoutingContext ctx) {
} else {
Map<String, Object> params = new HashMap<>();
ctx.queryParams().forEach(params::put);
+ if (ctx.request().method() == HttpMethod.POST) {
+ String jsonBody = ctx.body() != null ?
ctx.body().asString() : null;
+ if (jsonBody != null && !jsonBody.isBlank()) {
+ try {
+ Object parsed = Jsoner.deserialize(jsonBody);
+ if (parsed instanceof JsonObject jo) {
+ jo.forEach((k, v) -> params.put(k, v));
+ }
+ } catch (Exception e) {
+ // ignore invalid JSON
+ }
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]