@iota/http-client v1.0.0-alpha.912642aa
@iota/http-client
Sends commands to IRI over HTTP.
Allows to create a network provider compatible with functions in @iota/core.
Installation
Install using npm:
npm install @iota/http-clientor using yarn:
yarn add @iota/http-clientAPI 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 IRI node |
| settings.apiVersion | string | number | 1 | IOTA Api version to be sent as X-IOTA-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 IRI node |
| settings.apiVersion | string | number | 1 | IOTA Api version to be sent as X-IOTA-API-Version header. |
| settings.requestBatchSize | number | 1000 | Number of search values per request. |
Create an http client to access IRI http API.
Returns: Object
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago