Skip body building when HTTP call body is absent - #1649
Merged
Conversation
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The code change affects POST/PUT/PATCH but test coverage was only added for POST, leaving PUT/PATCH no-body behavior unverified.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes HTTP call handling so POST/PUT/PATCH workflows without with.body no longer throw an IllegalArgumentException, aligning behavior with the Serverless Workflow HTTP call spec.
Changes:
- Skip creating a body-based request executor when the HTTP call body is absent for
POST/PUT/PATCH. - Add a workflow sample that performs an HTTP
POSTwithout a body. - Add a regression test asserting that a
POSTwithoutwith.bodydoes not throw and sends an empty request body.
File summaries
| File | Description |
|---|---|
| impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/HttpExecutorBuilder.java | Selects a no-body request executor for POST/PUT/PATCH when body is null. |
| impl/test/src/test/java/io/serverlessworkflow/impl/test/HTTPWorkflowDefinitionTest.java | Adds a regression test for POST calls without with.body. |
| impl/test/src/test/resources/workflows-samples/call-http-post-no-body.yaml | Adds a minimal workflow sample for POST without a body. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fjtirado
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
Special notes for reviewers:
Additional information (if needed):
Closes #1648