CharlatanHttpClientAdapter class
An implementation of dio's HttpClientAdapter
that returns fake HTTP
responses based on the configuration of a Charlatan instance.
final charlatan = Charlatan();
Dio()..httpClientAdapter = CharlatanHttpClientAdapter(charlatan);
Constructors
- CharlatanHttpClientAdapter(Charlatan charlatan)
-
An implementation of dio's
HttpClientAdapter
that returns fake HTTP responses based on the configuration of a Charlatan instance.const
Properties
Methods
-
fetch(
RequestOptions options, Stream< Uint8List> ? requestStream, Future? cancelFuture) → Future<ResponseBody> -
Returns a
ResponseBody
matching the request if one exists in charlatan. If no response matches, throws UnimplementedError. -
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