انتقل إلى المحتوى الرئيسي

Type Alias: Transport

Transport = (request) => Promise<HttpReply>

Defined in: packages/identity/src/transport.ts:54

The one dependency an adapter has on the network: a function from request to reply. It is a single function rather than a client class so a unit test can replace it with a closure that records the request and returns a canned reply. It rejects only when no answer arrived (refused connection, TLS failure, timeout); a non-2xx status is a reply.

Parameters​

request​

HttpRequest

Returns​

Promise<HttpReply>