Skip to main content

5.3 Result handlers

Result handlers convert script execution results into HTTP responses. Each API selects one handler, with Structure as the default.

Guide​

  • Structure: Wrap results using a response template; the default handler.
  • Raw Value: Output the original script value.
  • CSV: Export a list of objects as CSV.
  • Text: Convert values to plain text.
  • VerifyCode: Render text as a PNG verification code.
  • Custom result handlers: extend output formats, status and response headers through ResultHandler.

Select a handler​

Select a Result Handler in the console or set the API's resultHandler option, then save and publish. Omitted options use the application default; unknown names fail before execution. See Visual operations and Example projects.

Configuration precedence​

Built-in defaults → constructor defaults → API options; later values take precedence. Edit API options under More Settings → API Options. An empty Structure tab retains the default response template.

All built-in handlers accept Map<String, ?> defaults. prepareOptions merges and validates settings, available through ResultContext.getOptions(); see Custom result handlers.