Repository navigation
feat(http): add header-aware retries - #2364
Merged
Merged
Conversation
- Add configurable retry rules and provider timing readers. - Bound request replay and preserve response ownership. - Add deterministic testing helpers and retry documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2364 +/- ##
===========================================
+ Coverage 99.97% 100.00% +0.02%
===========================================
Files 219 242 +23
Lines 11903 13018 +1115
Branches 2302 2416 +114
===========================================
+ Hits 11900 13018 +1118
+ Misses 3 0 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Test structural equality, hashing, and inherited interface parsing. - Make empty-interface option handling explicit.
ChrisPulman
approved these changes
Oct 17, 2026
- Test interface model equality and discovery deduplication. - Cover relative URL query emission and pre-escaped keys.
- Exercise request options, HTTP versions, and name reservations. - Cover candidate merging, empty parser input, and content capture.
|
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
Add opt-in HTTP-aware retries for Refit clients and ordinary
HttpClientcallers without an external resilience dependency.HttpRetryHandlerandHttpRetryOptionsfor configurable response rules, transport retries, bounded exponential backoff and full jitter.Retry-Afterand Azure, AWS, GitHub and Jira timing hints. Custom headers can specify their encoding.RetryReplyandStubHttp.CreateRetryHandlerfor deterministic retry tests withTimeProvider.[Url]support.Why
Transient HTTP failures and provider rate limits need retry timing that respects server instructions. A handler can apply those rules consistently without changing generated clients or requiring each application to implement request replay.
Breaking changes
None. Retries are opt-in, existing behavior stays unchanged, and no dependency or target framework changes are introduced.
How this was verified
Tests cover classification, provider parsing, replay, disposal, cancellation, fake-time waits and generated-client use; coverage includes every executable line and branch added by the retry implementation.
Built both shipped libraries, exercised the runtime and testing suites, and rendered the website with strict link validation.
Notes for the reviewer
Start with
HttpRetryHandlerfor request ownership and replay rules, thenRetryDelayProvidersfor provider-specific units and eligibility. The public API baseline additions are mechanical.Only safe methods retry by default. Unsafe methods require explicit opt-in. Server hints are not shortened by jitter, and hints above
MaxDelayreturn the response instead of retrying early.Timeouts, concurrency limits, circuit breakers, hedging and typed fallback are evaluated in the guide but are not added as strategies. Query aliases and redirect targets retain the existing
[AliasAs]and[Url]APIs, with no generator changes.The website guide is prepared in the separate website repository and is not included in this PR. Its build reported package audit and downgrade warnings, plus unresolved Android resource references.
Checklist