NodeHttp

constructor(clientProvider: () -> HttpClient, trustHost: TrustHost, bearerTokenProvider: () -> String?)(source)

Parameters

clientProvider

Returns the HttpClient to use for each request. Called on every outbound call so that callers can swap or rebuild the underlying client (e.g. after a TLS trust-store update) without stranding this instance on a closed/cancelled client.

trustHost

Trust-store callback used to evict and re-fetch a peer cert when an outbound call fails with an SSL error.

bearerTokenProvider

Supplies the current bearer token (PIN-derived per krill.zone.shared.security.PinDerivation.deriveBearerToken) on each request. null skips the Authorization header entirely, which is what unauthenticated FTUE traffic should do.


constructor(httpClient: HttpClient, trustHost: TrustHost, bearerTokenProvider: () -> String?)(source)

Convenience constructor for callers that supply a stable, pre-built HttpClient. Wraps the instance as { httpClient } so it satisfies the provider contract without requiring call-site changes.