Skip to main content

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

ParameterTypeDescription

config

IHttpTransportConfig

The transport config. See IHttpTransportConfig.

Returns

HttpTransport

Defined

@nilfoundation/niljs/src/transport/HttpTransport.ts:36

Methods

closeConnection()

closeConnection(): void

Closes the connection to the network.

Returns

void

Implementation of

ITransport.closeConnection

Defined

@nilfoundation/niljs/src/transport/HttpTransport.ts:68


connect()

connect(): void

Connects to the network.

Returns

void

Implementation of

ITransport.connect

Defined

@nilfoundation/niljs/src/transport/HttpTransport.ts:59


request()

request<T>(requestObject): Promise<T>

Sends a request to the network.

Type Parameters

Type ParameterDescription

T

Parameters

ParameterTypeDescription

requestObject

RequestArguments

The request object.

Returns

Promise<T>

The response.

Async

Implementation of

ITransport.request

Defined

@nilfoundation/niljs/src/transport/HttpTransport.ts:50