HttpsClient class final
A client for the HTTPS binding (bindings/https/0.2).
final client = HttpsClient(
base: Uri.parse('https://maintainer.example'),
serverVid: 'did:web:maintainer.example',
myVid: 'did:web:org.example',
token: 's3cret',
);
final response = await client.send<acl_grant.Payload, acl_grant.Response>(
request,
encode: (p) => p.toJson(),
decodeResponse: acl_grant.Response.fromJson,
);
Constructors
Properties
- endpoint → Uri
-
Where requests are posted.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- myVid → String?
-
This client's VID. Stamped as
issueron a request that has none, and required as therecipientof every success response.final - responseVerifier → ProofVerifier?
-
When set, every success response must carry a proof that verifies.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverVid → String?
-
The server's VID. Stamped as
recipienton a request that has none, and required as theissuerof every success response.final - timeout → Duration
-
Budget for one exchange.
final
- token → String?
-
The bearer token (§3).
final
Methods
-
close(
) → void - Close the underlying HTTP client, if this client created it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send<
P, R> (TrustTaskDocument< P> request, {required Object? encode(P payload), required R decodeResponse(Map<String, dynamic> json)}) → Future<TrustTaskDocument< R> > -
Send
requestand return the#responsedocument. -
sendAck<
P> (TrustTaskDocument< P> request, {required Object? encode(P payload)}) → Future<void> -
Send
requestto a fire-and-forget specification (SPEC §4.4.1), whose consumer answers success with204 No Content. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited