Class HttpRemoteConfigSource
Fetches configuration from an HTTP endpoint. Compatible with Consul KV, Azure App Configuration REST API, Spring Cloud Config, or any endpoint that returns YAML/JSON configuration content.
public sealed class HttpRemoteConfigSource : IRemoteConfigSource, IDisposable
- Inheritance
-
HttpRemoteConfigSource
- Implements
- Inherited Members
Constructors
HttpRemoteConfigSource(Uri, HttpClient?, ILogger?)
public HttpRemoteConfigSource(Uri endpoint, HttpClient? httpClient = null, ILogger? logger = null)
Parameters
endpointUriURL to fetch configuration from.
httpClientHttpClientOptional pre-configured HttpClient (e.g. with auth headers).
loggerILoggerOptional logger.
Properties
Name
Human-readable name of this config source (e.g. "consul", "http", "k8s-configmap").
public string Name { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
FetchAsync(CancellationToken)
Fetches the current configuration content from the remote source.
Returns null if the source is unreachable or has no content.
public Task<RemoteConfigResult?> FetchAsync(CancellationToken ct = default)