HttpRestTransport class final

FreedomeTransport over an injectable http.Client.

Implemented types

Constructors

HttpRestTransport(FreedomeEndpoint endpoint, {Client? client, Duration defaultTimeout = const Duration(seconds: 10)})
Creates a transport for endpoint; client is closed by close only when ownsClient.

Properties

defaultTimeout → Duration
Timeout when the caller gives none.
final
endpoint → FreedomeEndpoint
Target endpoint.
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() → Future<void>
Releases connections (idempotent).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(FreedomeRequest request, {Duration? timeout}) → Future<FreedomeResponse>
Sends request; throws NetworkException / RequestTimeoutException / TlsPinMismatchException when no HTTP response was obtained (HTTP error statuses are returned, not thrown).
override
toString() → String
A string representation of this object.
inherited

Operators

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