Class: HttpTransport
HttpTransport represents the HTTP transport for connecting to the network.
HttpTransport
Implements
Implements
Constructors
new HttpTransport()
new HttpTransport(__namedParameters): HttpTransport
Parameters
Parameter | Type |
---|---|
|
Returns
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:46
Properties
endpoint
endpoint: string;
The endpoint to which the transport connects.
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:29
fetcher()
fetcher: (input, init?) => Promise<Response>;
The fetcher to be used in the requests.
Parameters
Parameter | Type |
---|---|
|
|
|
|
Returns
Promise
<Response
>
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:44
headers
headers: Record<string, string>;
The headers to be used in the requests.
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:39
timeout
timeout: number;
The timeout for the requests.
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:34
Methods
request()
request(requestObject, client): Promise<void>
Sends a request to the network.
Parameters
Parameter | Type | Description |
---|---|---|
|
| The request object. |
|
| ‐ |
Returns
Promise
<void
>
The response.
Async
Implementation of
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:62