chore: Add docs and tests for sending custom headers#262
Merged
Conversation
WalkthroughAdds README documentation for default and per-request custom headers. Introduces a new test file validating header behavior (defaults, overrides, merging, case-insensitivity, Content-Type handling, edge cases) across multiple client methods. No runtime or public API changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches✅ Passed checks (3 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #262 +/- ##
==========================================
+ Coverage 88.16% 88.41% +0.24%
==========================================
Files 23 23
Lines 1217 1217
Branches 197 216 +19
==========================================
+ Hits 1073 1076 +3
+ Misses 86 85 -1
+ Partials 58 56 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jimmyjames
commented
Oct 3, 2025
jimmyjames
commented
Oct 3, 2025
rhamzeh
approved these changes
Oct 3, 2025
jimmyjames
added this pull request to the merge queue
Oct 3, 2025
4 tasks
4 tasks
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.
This PR adds documentation and testing for custom header functionality in the OpenFGA JavaScript SDK.
Description
What problem is being solved?
SDK is missing documentation and tests for sending custom HTTP headers.
How is it being solved?
Updating documentation and adding unit tests.
What changes are made to solve it?
baseOptions) and per-request headerstests/headers.test.ts) with 19 test cases covering all header scenarios including:In addition to unit testing, manual testing was also done:
References
Review Checklist
mainSummary by CodeRabbit
Documentation
Tests