Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 24.0

Div
Classe2e-refDiv
Rp

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.

Note
iconfalse

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:

Image Modified
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";
getRestHttpResponse() can be used to impement REST error handling. Refer to REST Service Error Handling for more details.
Panel
titleRelated Pages: