ConversionLayerAdapter class

A conversion layer which translates Dio HTTP requests to http compatible requests. This way there's no need to implement custom HttpClientAdapter for each platform. Therefore, the required effort to add tests is kept to a minimum. Since CupertinoClient and CronetClient depend anyway on http this also doesn't add any additional dependency.

Constructors

ConversionLayerAdapter(Client client)

Properties

client → Client
The underlying http client.
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({bool force = false}) → void
Close the current adapter and its inner clients or requests.
fetch(RequestOptions options, Stream<Uint8List>? requestStream, Future? cancelFuture) Future<ResponseBody>
Implement this method to make real HTTP requests.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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