Class: HttpTransport
HttpTransport represents the HTTP transport for connecting to the network.
HttpTransport
Implements
Implements
Constructors
new HttpTransport()
new HttpTransport(config): HttpTransport
Creates an instance of HttpTransport.
Parameters
Parameter | Type | Description |
---|---|---|
| The transport config. See IHttpTransportConfig. |
Returns
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:36
Methods
closeConnection()
closeConnection(): void
Closes the connection to the network.
Returns
void
Implementation of
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:68
connect()
connect(): void
Connects to the network.
Returns
void
Implementation of
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:59
request()
request<T>(requestObject): Promise<T>
Sends a request to the network.
Type Parameters
Type Parameter | Description |
---|---|
|
Parameters
Parameter | Type | Description |
---|---|---|
|
| The request object. |
Returns
Promise
<T
>
The response.
Async
Implementation of
Defined
@nilfoundation/niljs/src/transport/HttpTransport.ts:50