Class: _service

CTS.service. _service

new _service(endpoint, options)

Prototype for services
Parameters:
Name Type Description
endpoint string Url of the service endpoint
options Object.<string, any> Any options to reuse inside
Properties:
Name Type Description
endpoint string URL of the service
method string HTTP Method to use for the HTTP request
options Object.<string, Object> Options for the service

Methods

<static> getOptions() → {Object.<string, Object.<string, any>>}

Get the option of the current instance
Returns:
Dictionary of pair key-object where key are field name and object contain datatype, html and default value
Type
Object.<string, Object.<string, any>>

<static> getValues() → {Object.<string, string>}

Return values of current object
Returns:
A dictionary of key-value pair where key are field name
Type
Object.<string, string>

<static> send(callback, format)

Send the request
Parameters:
Name Type Description
callback function Callback in case of success
format string Format expected by data
Default Value:
  • text/xml

<static> setValue(key, value)

Set the value of a field
Parameters:
Name Type Description
key string Field whom value has to change
value string New value for given field