HttpTransport
Defined in: packages/rest/src/transport.ts:70
Sends one HTTP attempt and returns the raw Response.
Everything above it — routing, rate limiting, retries, decoding — is somebody else’s job, which is what makes the layer substitutable in tests.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HttpTransport(
options?):HttpTransport
Defined in: packages/rest/src/transport.ts:75
Parameters
Section titled “Parameters”options?
Section titled “options?”allowInsecureBaseURL?
Section titled “allowInsecureBaseURL?”boolean
Allow a cleartext http:// base URL on a network you trust (a REST proxy). Default false.
baseURL?
Section titled “baseURL?”string
fetch?
Section titled “fetch?”timeout?
Section titled “timeout?”number
Returns
Section titled “Returns”HttpTransport
Accessors
Section titled “Accessors”baseURL
Section titled “baseURL”Get Signature
Section titled “Get Signature”get baseURL():
string
Defined in: packages/rest/src/transport.ts:94
Base URL every request path is resolved against.
Returns
Section titled “Returns”string
timeout
Section titled “timeout”Get Signature
Section titled “Get Signature”get timeout():
number
Defined in: packages/rest/src/transport.ts:98
Per-attempt timeout in milliseconds.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”send()
Section titled “send()”send(
request):Promise<Response>
Defined in: packages/rest/src/transport.ts:107
Performs the attempt.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Promise<Response>
Throws
Section titled “Throws”If the caller’s signal was already aborted.
Throws
Section titled “Throws”If the attempt times out or the transport fails.