HttpResponse

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

Members

Functions

addHeader
HttpResponse addHeader(string name, string value)

Adds a header to the response.

flushHeaders
void flushHeaders()
Undocumented in source. Be warned that the author may not have intended to support it.
setStatus
HttpResponse setStatus(ushort status)

Sets the status of the response.

setStatusText
HttpResponse setStatusText(string statusText)

Sets the status text of the response.

writeBody
void writeBody(string body)

Writes the given string content to the body of the response. If this response has not yet written its status line and headers, it will do that first.

Variables

clientSocket
Socket clientSocket;

The socket that's used to send data to the client.

headers
string[string] headers;

An associative array of headers.

status
ushort status;

The status code.

statusText
string statusText;

A short textual representation of the status.

Meta