1.0.0-alpha.7 • Published 5 years ago
@helixnetwork/http-client v1.0.0-alpha.7
@helixnetwork/http-client
Sends commands to helix
over HTTP
.
Allows to create a network provider compatible with functions in @helixnetwork/core
.
Installation
Install using npm:
npm install @helixnetwork/http-client
or using yarn:
yarn add @helixnetwork/http-client
API Reference
http-client.send(command, uri, apiVersion)
Fulil: Object - Response
Reject: Error - Request error
Param | Type | Default |
---|---|---|
command | Command | |
uri | String | http://localhost:14265 |
apiVersion | String | Number | 1 |
Sends an http request to a specified host.
Returns: Promise
http-client~send
Param | Type |
---|---|
command | object |
Returns: object - response
http-client~setSettings
Param | Type | Default | Description |
---|---|---|---|
settings | object | {} | |
settings.provider | string | "http://localhost:14265" | Uri of helix node |
settings.apiVersion | string | number | 1 | Helix Api version to be sent as X-HELIX-API-Version header. |
settings.requestBatchSize | number | 1000 | Number of search values per request. |
http-client~createHttpClient(settings)
Param | Type | Default | Description |
---|---|---|---|
settings | object | {} | |
settings.provider | string | "http://localhost:14265" | Uri of helix node |
settings.timeout | number | Timeout | |
settings.apiVersion | string | number | 1 | Helix Api version to be sent as X-HELIX-API-Version header. |
settings.requestBatchSize | number | 1000 | Number of search values per request. |
Create an http client to access helix http API.
Returns: Object
1.0.0-alpha.7
5 years ago
1.0.0-alpha.6
5 years ago
1.0.0-alpha.5
5 years ago
1.0.0-alpha.4
5 years ago
1.0.0-alpha.3
5 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago
1.0.0-alpha.0
6 years ago
0.0.1-alpha.1
6 years ago