FiveErrorSuccess
Last updated 1/10/2024
FiveErrorSuccess Object
The
FiveErrorSuccess
object contains the result from calling five.success()
which is inherited from the FiveError
object.
Functions
setData()
The
setData()
is a function used on the FiveErrorSuccess
object that allows attaching additional data to a successful response which can be either displayed to the user, or used for other purposes like attaching documents.
Mime Types Defined on the Five
Object- MIMETypeDataURL
- MIMETypeFile
- MIMETypeJavaScript
- MIMETypeJSON
- MIMETypeText
Function Signature
setData(dataMimeType: MIMEType, data: any) : FiveError | null
Example
The following code adds additional data which is text based to the successful
Result
object.
Add additional text data to the success result
result = five.success();
result.setData(five.MIMETypeText, "Additional Information regarding this result");