Add body_from config to step.http_call for raw body forwarding#227
Merged
Add body_from config to step.http_call for raw body forwarding#227
Conversation
Contributor
|
@copilot try again |
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Contributor
Author
Implemented in c52f9bf. The
|
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add body_from config to step.http_call for raw body forwarding
Add body_from config to step.http_call for raw body forwarding
Mar 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds body_from support to the step.http_call pipeline step so request bodies can be forwarded without forced JSON re-encoding (enabling webhook passthrough, binary, XML, etc.), aligning behavior with existing _from/body_from patterns used in other steps.
Changes:
- Extend
HTTPCallStepwithbody_fromconfiguration and update request body construction to optionally forward rawstring/[]bytevalues. - Update request building to avoid auto-setting
Content-Type: application/jsonwhen the body is forwarded in raw mode. - Add unit tests covering
body_frombehaviors (string, bytes, step output resolution, content-type override, nil/missing path).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
module/pipeline_step_http_call.go |
Implements body_from resolution and raw-body handling for outgoing HTTP requests. |
module/pipeline_step_http_call_test.go |
Adds test coverage for body_from forwarding and header behavior. |
example/go.mod |
Updates example module dependencies (indirect). |
example/go.sum |
Updates example module checksums to match dependency changes. |
Contributor
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Contributor
Author
Applied all three review changes in af9ed8d:
|
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.
body_from/_frompattern in json_response and raw_response stepsbodyFromfield toHTTPCallStepstructbody_fromconfig key in the factory functionbuildBodyReader()to checkbodyFromfirst (raw bytes, no JSON encoding)Content-Type: application/jsonwhen usingbody_frombody_fromwith string,[]byte, step output path, Content-Type override, and nil valuesbodyFromstruct field comment to accurately describe dot-path semantics (includingsteps.<name>...support and JSON fallback for non-string/[]byte types)buildRequest()doc comment to clarify thatrawBodymeans "raw (string/[]byte/nil) body, skip auto Content-Type"-raceflagOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.