DioHttpAdapter class
Vanilla Dio HTTP adapter. Hook by calling
dio.interceptors.add(DioHttpAdapter(dio).asDioInterceptor());
after constructing the adapter.
NOT a Magic-coupled implementation — vanilla Flutter apps using raw Dio instances feed TelescopeStore via this adapter. Magic-app users get the Magic.Http facade adapter via magic's MagicTelescopeIntegration instead.
V1 stub: the actual Dio Interceptor subclass requires package:dio which
is not in telescope's pubspec (vanilla Flutter friendly — we avoid
declaring opinionated HTTP lib deps). Consumers add dio to THEIR pubspec
and wire this adapter manually. V1.x: move this to fluttersdk_telescope_dio
adapter sub-package.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Human-readable adapter name.
no setteroverride
- pendingCount → int
-
V1 stub adapter does not track in-flight requests (the Dio interceptor
wiring lives in consumer code). Explicit override is required because
Dart's
implementsclause does not inherit default method bodies from the TelescopeHttpAdapter contract.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
install(
) → void -
Wire the HTTP capture hook.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstall(
) → void -
Tear down the hook (test isolation).
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
recordRequest(
{required String url, required String method, required int statusCode, required int durationMs, bool isError = false, Map< String, String> ? requestHeaders, String? requestBody, String? responseBody}) → void - Convenience: programmatically record an HTTP request/response pair into TelescopeStore from any HTTP library wrapper (Dio, http, Chopper, raw).