new Client()
The HTTP client to request Sylvia-IoT APIs. With this client, you do not need to handle 401
refresh token flow.
- Source:
Methods
request(method, apiPath, bodyopt, callback)
Execute a Sylvia-IoT API request.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
method |
string | ||||||||||||||||||
apiPath |
string | The relative path (of the coremgr base) the API with query string. For example: `/api/v1/user/list?contains=word`, the client will do a request with `http://coremgr-host/coremgr/api/v1/user/list?contains=word` URL. | |||||||||||||||||
body |
Object |
<optional> |
|||||||||||||||||
callback |
function |
Properties
|
- Source:
Throws:
-
Wrong arguments.
- Type
- Error