DioHttpAdapter class
Dio-backed implementation of HttpAdapter.
All network traffic goes through a single shared Dio instance.
implementation — consumers that use HttpResponse need no changes.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
configure(
{Duration? connectTimeout, Duration? receiveTimeout, Duration? sendTimeout, int? maxConnectionsPerHost, bool forceIPv4 = false}) → void -
Configure client-specific settings (timeouts, connection pooling, etc.).
Adapters that don't support a particular option may ignore it.
override
-
delete<
T> ({required Uri apiUri, Map< String, String> ? headers, Map<String, dynamic> ? body}) → Future<HttpResponse< T> > -
override
-
get<
T> ({required Uri apiUri, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, HttpResponseType? responseType, Duration? ttl}) → Future<HttpResponse< T> > -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch<
T> ({required Uri apiUri, Map< String, String> ? headers, Map<String, dynamic> ? body}) → Future<HttpResponse< T> > -
override
-
post<
T> ({required Uri apiUri, Map< String, String> ? headers, dynamic body, HttpResponseType? responseType, Duration? ttl, bool idempotent = false}) → Future<HttpResponse< T> > -
override
-
put<
T> ({required Uri apiUri, Map< String, String> ? headers, Map<String, dynamic> ? body}) → Future<HttpResponse< T> > -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
upload(
{required Uri apiUri, required String filePath, Map< String, String> ? headers, String fieldName = 'file', Map<String, String> ? additionalFields}) → Future<HttpResponse> -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited