Returns a HTTP response object. Set the details of this object to return them to the caller.
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.
Substitutables
aResponseObject
An object of type Base Components.Add Ons.REST.Response:
Examples
create myErrorObject;
set error.code = "400";
set error.message = "Bad request.";
local response = getRestHttpResponse();
set response.responseObject = myErrorObject;
set response.httpStatus = "400";
getRestHttpResponse() can be used to implement REST error handling.