Add HTTP method shortcuts and output expression support in DSL#1458
Add HTTP method shortcuts and output expression support in DSL#1458matheusandre1 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds fluent DSL extensions for HTTP call tasks (HTTP verb shortcuts, headers/content-type helpers, redirect flag, post-configuration via andThen, and outputAs) and introduces tests to validate the new behavior.
Changes:
- Added HTTP verb shortcut methods and convenience helpers (redirect, accept/content-type shortcuts) to the HTTP DSL.
- Added
andThen(...)support onCallHttpSpecto apply additional builder modifications. - Added
outputAs(String)convenience method onCallHttpTaskBuilderand comprehensive JUnit tests for the new DSL features.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| fluent/spec/src/test/java/io/serverlessworkflow/fluent/spec/dsl/CallHttpDslExtensionsTest.java | Adds unit tests covering new HTTP DSL shortcuts, chaining with andThen, and outputAs. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/dsl/CallHttpSpec.java | Implements andThen(...) by storing additional steps to apply to the builder. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/dsl/BaseCallHttpSpec.java | Adds HTTP verb shortcuts and convenience methods for redirect and common headers. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/CallHttpTaskBuilder.java | Adds a convenience outputAs(String) method with Javadoc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return header("Accept", "application/x-www-form-urlencoded"); | ||
| } | ||
|
|
||
| default SELF acceptText() { |
There was a problem hiding this comment.
Could you put an acceptJson?
There was a problem hiding this comment.
Could you put an acceptJson?
There was a problem hiding this comment.
Great, really I did not see it.
be067c4 to
4403100
Compare
|
@matheusandre1 Good work, take a look to AI comments |
Signed-off-by: Matheus André <matheusandr2@gmail.com>
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
Closes: #1435
Special notes for reviewers:
Additional information (if needed):