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;clientis closed by close only whenownsClient.
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; throwsNetworkException/RequestTimeoutException/TlsPinMismatchExceptionwhen 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