Class RESTSuccessResponse
dw.system
Class RESTSuccessResponse
Object
dw.system.RESTSuccessResponse
This class represents a REST success response that is compliant with the RFC standards. It can only be instantiated using the createSuccess methods in RESTResponseMgr.

Here is an example:
var body = {"hello": "world"}
var success = RESTResponseMgr.createSuccess(body);
success.render();

The above script would result in an HTTP response with status code 200 and the following body:
{
 "hello": "world"
}

Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
render() : void
Sends the RESTSuccessResponse object as an HTTP response to the client.
Method Detail
render
render() : void
Sends the RESTSuccessResponse object as an HTTP response to the client. This sets the "Content-Type" header to "application/json" and expects the body to be a valid JavaScript JSON object.
Throws:
IllegalStateException - If the RESTSuccessResponse object is already rendered.
Exception - If there is an error while serializing the body.