fix(curl-import): treat inline --data-binary as body, not file - #8617
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe cURL importer now distinguishes inline JSON from file-based ChangescURL binary import
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
ðĨ Pre-merge checks | â 5â Passed checks (5 passed)
âĻ Finishing Touchesð§Š Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The 'accept word' shortcut added in usebruno#8607 introduced a second <kbd>{modifier}</kbd> in the keymap, so getByText(modifier) now throws on multiple matches. Use getAllByText to assert all occurrences. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sachin-thakur-bruno
left a comment
There was a problem hiding this comment.
Tested locally and working fine.
Description
Fixes #8542 â importing a cURL command that uses --data-binary with an inline payload (not a
@filereference) failed.curl's --data-binary flag sets isDataBinary = true for both inline data and
@filereferences. The importer's file-body branch only checked that flag, so inline JSON was assigned to body.file as a string. Since serialization assumes body.file is an array and calls .map() on it, this:crashed the New Request â From cURL flow with e.file?.map is not a function, andsilently dropped the body when pasting the cURL into the URL bar.
JIRA
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Screen.Recording.2026-07-15.at.2.28.54.PM.mov
Summary by CodeRabbit
Summary
Bug Fixes
--data-binaryso inline payloads are treated as request body content, while@filereferences still import in file/binary mode.Tests
@file--data-binary.Refactor