Request Handlers
Class finesse.interfaces.RequestHandlers(handlers)
Defines the REST object callback handlers that are passed as arguments while creating the REST object. Retrieves the methods when the object is created.
Parameters
Name |
Type |
Description |
Required |
||
---|---|---|---|---|---|
handlers |
Object |
An object containing callback functions which are invoked when the callback scenario is triggered. The following are the request handlers (see below for details):
|
Optional |
||
success(rsp) |
Function |
Callback function that is invoked upon a successful request. The initialized object is then passed to the callback function as a parameter. |
Optional |
||
error(rsp) |
Function |
Callback function that is invoked upon an unsuccessful request. The initialized object is then passed to the callback function as a parameter. |
Optional |
status Number The HTTP status code of the succeeded request. Optional content String The raw string response of the succeeded request. Optional object Object The parsed object response of the succeeded request. Optional error Object The error details from the failed request. Optional errorType String The type of error. Optional errorMessage String The message that is associated with the error. Optional