HttpResponse.writeBody

Writes the given input stream of bytes to the response's body.

struct HttpResponse
void
writeBody
(
S
)
(,
ulong size
,)
if (
isByteInputStream!S
)

Parameters

stream S

The stream of bytes to write to the output.

size ulong

The size of the response. This must be known beforehand to set the "Content-Length" header.

contentType string

The content type of the bytes.