HttpResponse

The data that the HTTP server will send back to clients.

Members

Functions

addHeader
HttpResponse addHeader(string name, string value)
Undocumented in source. Be warned that the author may not have intended to support it.
setBody
HttpResponse setBody(string messageBody)
Undocumented in source. Be warned that the author may not have intended to support it.
setStatus
HttpResponse setStatus(ushort status)
Undocumented in source. Be warned that the author may not have intended to support it.
setStatusText
HttpResponse setStatusText(string statusText)
Undocumented in source. Be warned that the author may not have intended to support it.
toBytes
ubyte[] toBytes()

Converts this response to a byte array in HTTP format.

Variables

headers
string[string] headers;

An associative array of headers.

messageBody
ubyte[] messageBody;

The body of the message.

status
ushort status;

The status code.

statusText
string statusText;

A short textual representation of the status.

Meta