Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0
Syntax
Code Block
languagenone
set aResponseObject = getRestHttpResponse()
Semantics

Returns a HTTP response object. Set the details of this object to return them to the caller.

Info

getRestHttpResponse() is only applicable in REST service context. In other contexts, e.g. if called via a SOAP shadow port (and thus SOAP context), getRestHttpRequest() will return NULL.

SubstitutablesaResponseObject

An object of type Base Components.Add Ons.REST.Response:

Examples
Code Block
languagenone
create myErrorObject;
set error.code = "400";
set error.message = "Bad request.";

local response = getRestHttpResponse();
set response.responseObject = myErrorObject;
set response.httpStatus = "400";
Tip

getRestHttpResponse() can be used to implement REST error handling.

rp
Panel
titleRelated Pages: