RPC Client for JSON/REST over http with AWS4 signatures
npm install moar-rpc-clientClient for JSON/REST/RPC over http with AWS4 signatures
CallResultArrayMap of s for the associated calls
CallResultArrayA structure with method names and their associated parameters.
Each result is an for the associated call key.
Kind: global class
* Client
* new Client(host, keys)
* .call(structures) ⇒ CallResult
| Param | Type | Description |
| --- | --- | --- |
| host | string | Host name |
| keys | Credentials | Optional credentials for AWS4 signing |
Example
``jsResult for greeting was ${results.greeting}
const client = new Client('api.moarhealth.com')
client.call({
greeting: "Mark"
initialize: { "some": "stuff" }
}).then(results => {
console.log()Result for initialize was ${results.initialize}
console.log()``
})
Kind: instance method of Client
Returns: CallResult - A promise to produce
| Param | Type | Description |
| --- | --- | --- |
| structures | CallStructure | Structure for the calls the client will make. |
CallResultArray| Name | Type | Description |
| --- | --- | --- |
| 0 | object | Error object |
| 1 | object | Data object |
CallResultArrayEach result is an for the associated call key.
Kind: global typedef