Class: baseClient

baseClient

Base RESTful/Redfish class

new baseClient()

This class is initiated by other helper function. User won't need to initiate it directly.

Methods


get(path, useCache, headers)

Send GET request
Parameters:
Name Type Description
path string relative URI of RESTful/Redfish
useCache bool Use data from local cache or not
headers object Additional headers can be passed-in, default to null
Returns:
Promise object of this GET request
Type
promise

getRootObject(headers)

Retrieve the root object
Parameters:
Name Type Description
headers object Additional headers can be passed-in
Returns:
A Promise object which returns the HTTP response after login
Type
promise

login(userName, password)

Login to the RESTful/Redfish API
Parameters:
Name Type Description
userName string Your iLO user account
password string Password for your account
Returns:
A Promise object which returns the HTTP response after login
Type
promise

logout()

Logout
Returns:
A Promise object which returns the HTTP response after logout
Type
promise

patch(path, body, optionalPassword, providerHeader)

Send PATCH request
Parameters:
Name Type Description
path string relative URI of RESTful/Redfish
body object body
optionalPassword string Optional password
providerHeader string Perhaps we should hide this one?
Returns:
Promise object of this PATCH request
Type
promise

post(path, body, providerHeader)

Send POST request
Parameters:
Name Type Description
path string relative URI of RESTful/Redfish
body object body
providerHeader string Perhaps we should hide this one?
Returns:
Promise object of this POST request
Type
promise

put(path, body, optionalPassword, providerHeader)

Send PUT request
Parameters:
Name Type Description
path string relative URI of RESTful/Redfish
body object body
optionalPassword string Optional password
providerHeader string Perhaps we should hide this one?
Returns:
Promise object of this PUT request
Type
promise