Constructor
new WebConnect(optionsopt)
The LocalStorage class encapsulates the access to data objects.
Name | Type | Attributes | Description |
---|---|---|---|
options | Object | <optional> | options contains definitions for the datasource. |
- Since
- 3.1.0
- Copyright
- schukai GmbH
- License
- AGPLv3
import {WebConnect} from '@schukai/monster/source/data/datasource/server/webconnect.mjs';
const ds = new WebConnect({
url: 'https://httpbin.org/get'
});
ds.set({flag: true})
ds.write().then(() => console.log('done'));
ds.read().then(() => console.log('done'));
Members
defaults
PropertiesName | Type | Default | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url | string | Defines the resource that you wish to fetch. | ||||||||||||||||||||||||||||
connection | Object | Properties
| ||||||||||||||||||||||||||||
write | Object | {} | Options Properties
| |||||||||||||||||||||||||||
read | Object | {} | Options Properties
|
(static) instanceSymbol
instanceof
operator.This method is called by the instanceof
operator.
Methods
close() → {Promise}
This method closes the connection.
- Type:
- Promise
connect() → {Promise}
- Type:
- Promise
getClone() → {RestAPI}
- Type:
- RestAPI
isConnected() → {boolean}
- Type:
- boolean
read() → {Promise}
- Type:
- Promise
write() → {Promise}
- Type:
- Promise