DioNetworkClient class
Canonical Dio-backed implementation of NetworkClient.
Owns its Dio instance outright — timeouts, status validation and the
common header interceptor are configured here and nowhere else.
- Implemented types
Constructors
-
DioNetworkClient({required Map<
String, String> commonHeadersProvider(), @visibleForTesting HttpClientAdapter? httpClientAdapter})
Properties
-
commonHeadersProvider
→ Map<
String, String> Function() -
The common Engage headers, resolved on every request — never snapshotted,
so the session ID is the current one even after a rotation (D8).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void -
Releases the underlying engine. In-flight requests are allowed to finish.
override
-
execute(
NetworkRequest request) → Future< NetworkResponse> -
Executes a standard HTTP request and returns the response.
override
-
executeMultipart(
MultipartUploadRequest request) → Future< NetworkResponse> -
Executes a multipart/form-data upload request.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openSseStream(
NetworkRequest request, SseStreamHandler handler) → CancellableSubscription -
Opens a long-lived Server-Sent Events stream.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited