Response

Constructors

this
this()
Undocumented in source.
this
this(string content)
Undocumented in source.
this
this(HttpBody bodyContent)
Undocumented in source.
this
this(HttpServerResponse response)
Undocumented in source.

Members

Aliases

setHeader
alias setHeader = header
Undocumented in source.
withContent
alias withContent = setContent
Undocumented in source.
withHeaders
alias withHeaders = headers
Undocumented in source.

Functions

do403
void do403(string body_, string contentype)
Undocumented in source. Be warned that the author may not have intended to support it.
do404
void do404(string body_, string contentype)
Undocumented in source. Be warned that the author may not have intended to support it.
doError
void doError(ushort code, string body_, string contentype)
Undocumented in source. Be warned that the author may not have intended to support it.
doError
void doError(ushort code, Throwable exception, string contentype)
Undocumented in source. Be warned that the author may not have intended to support it.
download
Response download(string filename, ubyte[] file, string content_type)

download file

getFields
HttpFields getFields()
Undocumented in source. Be warned that the author may not have intended to support it.
header
Response header(string header, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
header
Response header(HttpHeader header, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
headers
Response headers(T[string] headers)
Undocumented in source. Be warned that the author may not have intended to support it.
httpResponse
HttpServerResponse httpResponse()
Undocumented in source. Be warned that the author may not have intended to support it.
setContent
Response setContent(T content, string contentType)

Sets the response content.

setHtmlContent
Response setHtmlContent(string content)
Undocumented in source. Be warned that the author may not have intended to support it.
setHttpError
void setHttpError(ushort code)
Undocumented in source. Be warned that the author may not have intended to support it.
setReason
Response setReason(string reason)
Undocumented in source. Be warned that the author may not have intended to support it.
setRestContent
Response setRestContent(T content)
Undocumented in source. Be warned that the author may not have intended to support it.
setStatus
Response setStatus(int status)

set http status code eg. 404 200

status
int status()
Undocumented in source. Be warned that the author may not have intended to support it.
withCookie
Response withCookie(Cookie cookie)

Add a cookie to the response.

Variables

_response
HttpServerResponse _response;
Undocumented in source.

Meta