Configuration Source Extraction part 4/5 - Integrate Default HTTP Client #206
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.
Configuration Source Extraction part 4/5 - Integrate Default HTTP Client
🥞 Configuration Refactor Stacked Pull Requests 🥞
🔲 Make HTTP client injectable via constructor (#207)
👉 Integrate default HTTP client implementation (this PR)
✅ Add configuration HTTP client interface (#205)
✅ Add flagsSnapshotId field to Configuration (#208)
✅ Extract DTO interfaces for downstream SDK extensibility (#197)
⬇️
feature/v4(trunk)Motivation and Context
PR #205 extracted the
IEppoConfigurationHttpClientinterface, but without a concrete implementation, the SDK cannot actually fetch configurations.This PR provides a default implementation using OkHttp that:
DefaultEppoConfigurationHttpClientclassConfigurationRequestorseamlesslyThis allows the SDK to continue working out-of-the-box while enabling downstream SDKs to provide alternative implementations.
Description
Create
DefaultEppoConfigurationHttpClient- an OkHttp-based implementation ofIEppoConfigurationHttpClientand integrate it into the existing codebase.Implementation Details
DefaultEppoConfigurationHttpClient:Callfor HTTP requestsObjectMapperfor JSON deserializationIntegration Changes
ConfigurationRequestor:IEppoConfigurationHttpClientin constructorEppoHttpClientcallsBaseEppoClient:DefaultEppoConfigurationHttpClientinstanceConfigurationRequestorHow has this been documented?
DefaultEppoConfigurationHttpClientHow has this been tested?
Breaking Changes
None. The SDK continues to work exactly as before, using the default OkHttp-based implementation.
Dependencies
Depends on: PR #205 (typo/flag-source-interface)
Blocks: PR #207