Fixes examples, issues 2058, 1761, 1889, and 2056#2061
Merged
ChrisPulman merged 2 commits intomainfrom Mar 20, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2061 +/- ##
==========================================
+ Coverage 82.00% 82.17% +0.16%
==========================================
Files 36 36
Lines 2657 2681 +24
Branches 419 424 +5
==========================================
+ Hits 2179 2203 +24
Misses 375 375
Partials 103 103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
glennawatson
approved these changes
Mar 20, 2026
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.
What kind of change does this PR introduce?
update
What is the current behavior?
#2058
#1761
#1889
#2056
What is the new behavior?
closes #2058 (Newtonsoft async deserialization path)
Updated NewtonsoftJsonContentSerializer to use async-friendly content read behavior.
Added test coverage proving no sync-only stream requirement:
Refit.Tests/SerializedContentTests.cs
Test: StreamDeserialization_UsingNewtonsoftJsonContentSerializer_DoesNotUseSynchronousReads
closes #1761 (AuthorizationHeaderValueGetter with supplied HttpClient)
Implemented token application from AuthorizationHeaderValueGetter during request construction when using supplied HttpClient overloads.
Propagated method CancellationToken to the getter delegate.
Added tests:
Refit.Tests/AuthenticatedClientHandlerTests.cs
AuthorizationHeaderValueGetterIsUsedWhenSupplyingHttpClient
AuthorizationHeaderValueGetterDoesNotOverrideExplicitTokenWhenSupplyingHttpClient
Refit.Tests/RequestBuilder.cs
AuthorizationHeaderValueGetterReceivesMethodCancellationToken
closes #1889 (ignore query properties)
Added support to skip query properties marked with:
[IgnoreDataMember]
[System.Text.Json.Serialization.JsonIgnore]
[Newtonsoft.Json.JsonIgnore]
Added test:
Refit.Tests/RequestBuilder.cs
PostWithObjectQueryParameterSkipsIgnoredProperties
closes #2056 (customer header issue)
Added documentation warning and guidance about handler lifetimes + per-request state:
README.md (important guidance for IHttpClientFactory / delegating handler pooling)
Also added/updated example material demonstrating safer patterns.
Resolves issues with samples, refactored and extended, updated for current code base.
Please check if the PR fulfills these requirements
Other information: