Calltypeno test imports ittype Call = (request: Request) => Promise<Result<Reply, ApiProblem>>;A function from a request to an answer or why there is none.
What the two clients of a host share: one request over a transport, with the token put in the one header the host reads it from, and the failures that mean the same on both (a token not accepted, a token that may not, a throttle, a host that failed) told as the problems of the API. The transport is a function from a request to an answer that never throws: a connection that fails is a value, and no redirect is followed by this code. No URL, header, detail or log line made here holds the token: every sentence passes through the redactor, and the token travels in its one header of its one request.
Calltypeno test imports ittype Call = (request: Request) => Promise<Result<Reply, ApiProblem>>;A function from a request to an answer or why there is none.
makeCallerfunctionfunction makeCaller(options: CallerOptions): CallA caller over a transport.
Replytypetype Reply = { readonly status: number; readonly headers: Readonly<Record<string, string>>; readonly body: string };One answer, whatever its status below 400 and the statuses a host's client reads itself.
Requesttypeno test imports ittype Request = {
readonly method: OutRequest["method"];
readonly path: string;
readonly query?: Readonly<Record<string, string>>;
readonly json?: unknown;
};One request: the method, the path from the base of the API, the query, and a JSON body.