ExternalObject

simplicite~ ExternalObject

External object.
ou should never instanciate this class directly but rather call getExternalObject.

Constructor

new ExternalObject(ses, name)

Description:
  • Constructor
Source:
Parameters:
Name Type Description
ses Session Session
name string Business object name

Methods

call(paramsopt, dataopt, optsopt) → {promise.<object>}

Description:
  • Call an external object
Source:
Parameters:
Name Type Attributes Description
params object <optional>
Optional URL parameters
data object | string | FormData <optional>
Optional body data (for 'POST' and 'PUT' methods only)
opts object <optional>
Options
Properties
Name Type Attributes Description
path string <optional>
Absolute or relative path (e.g. absolute '/my/mapped/upath' or relative 'my/additional/path')
method object <optional>
Optional method 'GET', 'POST', 'PUT' or 'DELETE' (defaults to 'GET' if data is not set or 'POST' if data is set)
contentType function <optional>
Optional data content type (for 'POST' and 'PUT' methods only)
accept function <optional>
Optional accepted response type (e.g. 'application/json")
error function <optional>
Error handler function
businessCase string <optional>
Business case label
Returns:
Promise to the external object content
Type
promise.<object>

callParams(params) → {string}

Description:
  • Build URL-encoded parameters
Source:
Parameters:
Name Type Description
params object URL parameters as key/value pairs
Returns:
URL-encoded parameters
Type
string

getName() → {string}

Description:
  • Get name
Source:
Returns:
Name
Type
string

invoke()

Description:
  • Alias to call
Source: