HTTPServerResponse.writeBody

Writes the entire response body as a single string.

Parameters

data string

The string to write as the body contents

status int

Optional response status code to set

content_type string

Optional content type to apply to the response. If no content type is given and no "Content-Type" header is set in the response, this will default to "text/plain; charset=UTF-8".

See Also

HTTPStatusCode ditto

Meta