Skip to content

fetchAgentInfo

View as Markdown
function fetchAgentInfo(fetchFn, hubUrl): Promise<
| {
minAgentVersion: string;
protocol: number;
transports: object[];
}
| null>;

Defined in: agent/src/transport/choose.ts:8

What the hub serves (GET <hub>/agent/info), or null when it cannot be read (offline, not a 0.3 hub, bad answer).

Parameter Type
fetchFn (input, init?) => Promise<Response>
hubUrl string

Promise< | { minAgentVersion: string; protocol: number; transports: object[]; } | null>