fix(har): ensure HTTP methods are uppercase to prevent server rejections - #9250
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe change normalizes HTTP methods to uppercase during HAR construction. It applies the normalized method to request signing and HAR output. Tests verify defaults, custom methods, non-string values, and generated command output. ChangesHTTP Method Normalization
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change consistently uppercases HTTP methods for HAR and generated snippets, with coverage for the affected output paths. 🚥 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. Lowercase verbs rise bright and clear Comment |
Description
fixes #9249
Generate Code copies the request's method into the snippet exactly as it is held in memory. When that value is lowercase, the generated command is not runnable:
curl --request post --url https://api.example.com/users # server responds 400Fix
Fix belongs in
buildHar(packages/bruno-common/src/generate-code/har/index.ts), the single canonical Bruno → HAR pipeline, so every target and every future consumer is covered rather than one call site.Screenshots
|


|
|
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.
Summary by CodeRabbit
Bug Fixes
GET.Tests