webos/ L S2 Request
Provides a class for making LS2 service requests on webOS platforms.
import LS2Request from '@enact/webos/LS2Request';Members
LS2RequestClass
A class for managing LS2 Requests.
import LS2Request from '@enact/webos/LS2Request';Constructor
Methods
- cancel()undefined
Cancel the current LS2 request.
Returns
- undefined
- send(options)webos/LS2Request
Send a request to an LS2 service method.
1 Param
- options Object
Options for the LS2 Request call
- service String
The name of the LS2 service.
- method String
The name of the method.
- parameters Object
Any parameters required by the service method.
- onSuccess Function
The success handler for the request.
- onFailure Function
The failure handler for the request.
- onComplete Function
The handler to run when the request is completed, regardless of return status.
- onTimeout Function
The handler to run when the request times out. Used in conjunction with
timeout.- subscribe Boolean
Subscribe to service methods that support subscription.
- timeout Number
The delay in milliseconds to wait for the request to return.
Object keys for options
Returns
ArrayBooleanFunctionModuleNumberObjectString