HttpResponse.writeBodyString

Writes the given text to the body of the response. It's a simple wrapper around writeBody(ubyte[], string).

struct HttpResponse
void
writeBodyString
(
string text
,
string contentType = "text/plain; charset=utf-8"
)

Parameters

text string

The text to write.

contentType string

The content type of the text. Defaults to text/plain.