RESTAPIResponse - getStreamWriter()

Get the ResponseStreamWriter for this response, allowing you to write directly to the response stream.

Set the content type and status code using the setHeaders and setStatus functions prior to calling the getStreamWriter function. If you do not set a status code, the status code defaults to 200.
Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
RESTAPIResponseStream The ResponseStreamWriter for this response. You can use this object to write directly to the response stream.
var writer = response.getStreamWriter();