Support custom HTTP headers on folio_* requests - #146
Merged
Merged
Conversation
Allow callers to pass a headers dict to folio_get/put/post/delete (and their async and pagination variants) for per-request custom headers, merged with the client's default auth headers.
|
3 tasks done
bltravis
added a commit
that referenced
this pull request
Sep 18, 2026
SonarCloud's quality gate failed PR #146 on new-code duplication (24.6%, threshold 3%), isolated to tests/test_folio_client.py (32% new-code duplication). Extract shared helpers for the mock httpx client setup and the paginated folio_get fake, reused across all 13 tests in TestCustomHeaders.
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.


Summary
headerskwarg tofolio_get,folio_put,folio_post,folio_delete(and their async variants) plusfolio_get_all/folio_get_all_asyncand their pagination helpers, so callers can pass per-request HTTP headers that are merged with the client's default auth headers.- Adds debug logging to list unused kwargsTest plan
TestCustomHeadersintests/test_folio_client.pycovering header forwarding forfolio_get/folio_put/folio_post/folio_deleteand async variants, plus regression tests for_folio_get_all/_folio_get_all_async(the fixed bug) and regression-guard tests for_folio_get_all_by_id_offset/_async.uv run python -m pytest tests/— 284 passed locally.