HubApiClient constructor
HubApiClient(
- Uri baseUrl, {
- String? token,
- String? principal,
- ApiTransport? transport,
Creates a client for baseUrl.
transport defaults to the platform's own: HttpClient on the VM, fetch
in a browser. Inject one to reach a Hub over TLS with a private CA
(IoApiTransport(securityContext: …), VM only), or to drive the client
against a fake Hub in tests.
Implementation
HubApiClient(
this.baseUrl, {
this.token,
this.principal,
ApiTransport? transport,
}) : _transport = transport ?? defaultApiTransport();