RemoteCatalogFetcher
Category: Catalog
Source: remote_catalog_fetcher.dart
Fetches a remote catalog YAML and returns a sanitized payload, never throwing.
Failure cases (timeout, network error, non-2xx, parse error upstream) are returned as [FetchFailed] values so the caller can decide whether to log.
Classes
sealed FetchResult
Constructor
dart
const FetchResult()FetchUpdated
Constructor
dart
const FetchUpdated({required this.yaml, this.etag, this.lastModified})Properties
| Property | Type | Description |
|---|---|---|
yaml | String | Sanitized YAML payload (credentials stripped). |
etag | String? | |
lastModified | String? |
FetchNotModified
Constructor
dart
const FetchNotModified()FetchFailed
Constructor
dart
const FetchFailed({required this.reason})Properties
| Property | Type | Description |
|---|---|---|
reason | String |
RemoteCatalogFetcher
Constructor
dart
RemoteCatalogFetcher({http.Client? client})Methods
`Future<FetchResult> fetch(
Uri uri, {
String? ifModifiedSince,
Duration timeout = const Duration(seconds: 10),
})`