You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/07/27 14:15:24 UTC

[PR] CAMEL-24274: camel-tui - Send Message uses HTTP for platform-http routes [camel]

davsclaus opened a new pull request, #25162:
URL: https://github.com/apache/camel/pull/25162

   _Claude Code on behalf of davsclaus_
   
   ## Summary
   
   When the TUI "Send Message" dialog (F2 > Send Message) selects a route that uses `platform-http` as its consumer, sending fails with `FailedToCreateProducerException` because `platform-http` is a consumer-only component.
   
   This fix detects `platform-http` routes and sends an actual HTTP request directly from the TUI using Java's `HttpClient`, bypassing the dev console `ProducerTemplate` path entirely. The HTTP server base URL is already available via `IntegrationInfo.httpServer`.
   
   **Changes:**
   - `SendMessagePopup`: detects platform-http routes and sends HTTP requests directly using Java `HttpClient` (same pattern as `HttpTab` probe). Extracts path from the platform-http URI, determines HTTP method from `httpMethodRestrict` query param, and handles file-based body payloads.
   - `ActionsPopup`: passes `info.httpServer` to the send message popup
   
   ## Test plan
   - [ ] Run a Camel app with platform-http routes (e.g., REST API)
   - [ ] Open TUI, F2 > Send Message, select a platform-http route
   - [ ] Send a message — should succeed with HTTP response (status, headers, body)
   - [ ] Verify non-platform-http routes (direct, seda) still work via the existing dev console path
   - [ ] Verify file-based body payloads work for platform-http routes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24274: camel-tui - Send Message uses HTTP for platform-http routes [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #25162:
URL: https://github.com/apache/camel/pull/25162


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24274: camel-tui - Send Message uses HTTP for platform-http routes [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25162:
URL: https://github.com/apache/camel/pull/25162#issuecomment-5092684325

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24274: camel-tui - Send Message uses HTTP for platform-http routes [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25162:
URL: https://github.com/apache/camel/pull/25162#issuecomment-5093033858

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `dsl/camel-jbang/camel-jbang-plugin-tui`
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 2 tested, 1 compile-only — current: 2 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **3 affected modules** (current approach: 2).
   
   <details><summary>:warning: Modules only in Scalpel (1)</summary>
   
   - `camel-launcher`
   
   </details>
   
   **Skip-tests mode would test 2 modules** (1 direct + 1 downstream), **skip tests for 1** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (2)</summary>
   
   - `camel-jbang-plugin-tui`
   - `camel-launcher-container`
   
   </details>
   
   <details><summary>Modules with tests skipped (1)</summary>
   
   - `camel-launcher`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   <details><summary>All tested modules (3 modules)</summary>
   
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: Launcher
   - Camel :: Launcher :: Container
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/30274191013)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24274: camel-tui - Send Message uses HTTP for platform-http routes [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #25162:
URL: https://github.com/apache/camel/pull/25162#issuecomment-5093504056

   Thanks for the review @gnodet — addressed both observations:
   
   1. **Test coverage**: Moved `extractPlatformHttpPath` and `extractHttpMethod` to a new `HttpHelper` utility class (package-private) and added `HttpHelperTest` with 6 test cases covering the URI parsing logic.
   
   2. **HTTP client code duplication**: Extracted the shared HTTP request/response cycle into `HttpHelper.sendRequest()` with a simple `HttpResult` record. Both `SendMessagePopup` and `HttpTab` now delegate to it, removing ~50 lines of duplicated boilerplate from each.
   
   _Claude Code on behalf of davsclaus_


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org