HttpTransportFactory class final

Default factory: one http.Client per endpoint.

Implemented types

Constructors

HttpTransportFactory({Client? clientFor(FreedomeEndpoint endpoint)?, Duration timeout = const Duration(seconds: 10), MessageSocketConnector? sockets = defaultSocketConnector})
Creates the factory; clientFor customises the client per endpoint (e.g. TLS pinning on dart:io).
const

Properties

clientFor → Client? Function(FreedomeEndpoint endpoint)?
Optional client builder (null result = default client).
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sockets → MessageSocketConnector?
Opens text sockets (plain WS, GraphQL-WS); null = this factory has no realtime (the client runs REST-only).
final
timeout → Duration
Default request timeout.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rest(FreedomeEndpoint endpoint) → FreedomeTransport
A REST transport for endpoint.
override
toString() → String
A string representation of this object.
inherited

Operators

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