HorusClient class final
Small cross-platform HTTP runtime used by generated Maat clients.
Constructors
-
HorusClient(Uri baseUri, {Client? httpClient, Map<
String, String> headers = const {}, HeadersProvider? headersProvider, SocketIdProvider? socketIdProvider})
Properties
- baseUri → Uri
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headersProvider ↔ HeadersProvider?
-
Consulted before every request, so a token refreshed between two calls
reaches the second one. A fixed
headersmap cannot express that.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- socketIdProvider ↔ SocketIdProvider?
-
Sends
X-Socket-IDwhile a realtime connection is open, which is the headerPendingBroadcast.toOthers(request)reads to skip the client that caused the change. Set by HorusRealtime; leaving it null simply sends no header.getter/setter pair
Methods
-
close(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveHeaders(
[Map< String, String> headers = const {}]) → Future<Map< String, String> > -
The headers this client would send for a request carrying
headers. -
send<
T> (Endpoint< T> endpoint, {Map<String, Object?> pathParameters = const {}, Map<String, Object?> queryParameters = const {}, Object? body, Map<String, String> headers = const {}}) → Future<T> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited