network library

Sixplace's UI-independent HTTP networking foundation.

Classes

SPCancelToken
Cancels one request, or a group of requests sharing this token.
SPNetwork
Persistent, UI-independent client with an optional shared instance.
SPNetworkConfig
Validated, immutable configuration for one backend.
SPNetworkLog
Safe request lifecycle metadata. Logging is opt-in.
SPNetworkResponse<T>
A successful HTTP response and optional application-decoded data.
SPRequestOptions
Per-call overrides; mutable maps are copied when the call starts.
SPRetryPolicy
Bounded exponential retries for GET and HEAD only.
SPUploadFile
A byte-backed multipart file that also works on Flutter Web.

Enums

SPHttpMethod
Supported HTTP verbs. Only GET and HEAD are automatically retried.
SPNetworkErrorType
Stable categories for application-specific messages and recovery.
SPResponseType
Successful response decoding strategy.

Typedefs

SPNetworkLogger = void Function(SPNetworkLog event)
Receives sanitized metadata only; no URL paths, queries, headers or bodies.
SPTokenProvider = FutureOr<String?> Function()
Reads the current bearer token without tying Sixplace to a storage package.
SPUnauthorizedHandler = FutureOr<void> Function(SPNetworkException error)
App-owned cleanup/navigation after an authenticated HTTP 401.

Exceptions / Errors

SPNetworkException
A typed failure without navigation, storage, or UI side effects.