VcrAdapter class
Constructors
- VcrAdapter({String basePath = 'test/cassettes', bool createIfNotExists = true})
Properties
- basePath ↔ String
-
getter/setter pair
- createHttpClient ↔ CreateHttpClient?
-
When this callback is set,
Dio
will call it every time it needs a HttpClient.getter/setter pairinherited - createIfNotExists ↔ bool
-
getter/setter pair
- file → File
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onHttpClientCreate ↔ OnHttpClientCreate?
-
Dio
will create HttpClient when it is needed. If onHttpClientCreate has provided,Dio
will call it when a HttpClient created.getter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- validateCertificate ↔ ValidateCertificate?
-
Allows the user to decide if the response certificate is good.
If this function is missing, then the certificate is allowed.
This method is called only if both the SecurityContext and
badCertificateCallback
accept the certificate chain. Those methods evaluate the root or intermediate certificate, while validateCertificate evaluates the leaf certificate.getter/setter pairinherited
Methods
-
close(
{bool force = false}) → void -
Close the current adapter and its inner clients or requests.
inherited
-
fetch(
RequestOptions options, Stream< Uint8List> ? requestStream, Future? cancelFuture) → Future<ResponseBody> - Implement this method to make real HTTP requests.
-
loadFile(
String path) → File -
loadPath(
String path) → String -
makeNormalRequest(
RequestOptions options, Stream< Uint8List> ? requestStream, Future? cancelFuture) → Future<Map?> -
matchRequest(
RequestOptions options) → Future< Map?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
useCassette(
dynamic path) → dynamic
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited