DioAdapter class

DioAdapter - Dio-based implementation of NetworkAdapter

DioAdapter - 基于 Dio 的 NetworkAdapter 实现

This is the default and most feature-complete adapter for RxNet Plus. It leverages the powerful Dio library to provide comprehensive HTTP functionality.

这是 RxNet Plus 的默认且功能最完整的适配器。 它利用强大的 Dio 库提供全面的 HTTP 功能。

Implemented types

Constructors

DioAdapter({Dio? dio})
Creates a DioAdapter.

Properties

dio Dio
Gets the underlying Dio instance.
no setter
hashCode int
The hash code for this object.
no setterinherited
name String
Gets the name of the adapter.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
Gets the version of the adapter.
no setteroverride

Methods

addInterceptor(AdapterInterceptor interceptor) → void
Adds an interceptor to the adapter.
override
cancel(CancelToken token) → void
Cancels an ongoing request.
override
download(AdapterRequest request, String savePath, {ProgressCallback? onProgress}) Future<AdapterResponse>
Downloads a file from the server.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeInterceptor(AdapterInterceptor interceptor) → void
Removes an interceptor from the adapter.
override
request(AdapterRequest request) Future<AdapterResponse>
Executes an HTTP request.
override
toString() String
A string representation of this object.
inherited
upload(AdapterRequest request, {ProgressCallback? onProgress}) Future<AdapterResponse>
Uploads data to the server.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited