DioEnsendHttpClient class
package:dio-backed transport for the Ensend API.
Use EnsendClient.withDio to opt into this adapter. You can supply your own
pre-configured Dio instance to add interceptors, certificate pinning, or
proxy settings without wrapping the client.
final dio = Dio()
..interceptors.add(LogInterceptor());
final client = EnsendClient.withDio(secret: 'sk_...', dio: dio);
Auth headers, base URL, timeout, and validateStatus are injected
per-request via Options so a provided Dio instance is never mutated.
- Implemented types
Constructors
- DioEnsendHttpClient(EnsendConfig config, {Dio? dio, EnsendLogger? logger})
Properties
- config → EnsendConfig
-
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(
) → void -
Releases any underlying connection pool or resources.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String path, Map< String, dynamic> body) → Future<Map< String, dynamic> > -
Sends a POST request to
path(relative to the configured base URL) with the JSON-encodedbody.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited