HttpServerResponse

Constructors

this
this()
Undocumented in source.
this
this(int status, HttpFields fields, long contentLength)
Undocumented in source.
this
this(int status, string reason)
Undocumented in source.
this
this(int status, string reason, HttpFields fields, long contentLength)
Undocumented in source.
this
this(HttpBody content)
Undocumented in source.

Members

Aliases

withCookie
alias withCookie = addCookie
Undocumented in source.

Functions

addCookie
HttpServerResponse addCookie(Cookie cookie)

Add a cookie to the response.

Inherited Members

From HttpResponse

_status
int _status;
Undocumented in source.
_reason
string _reason;
Undocumented in source.
isResponse
bool isResponse()
Undocumented in source. Be warned that the author may not have intended to support it.
getStatus
int getStatus()

@return the HTTP status

getReason
string getReason()

@return the HTTP reason

setStatus
void setStatus(int status)

@param status the HTTP status to set

setReason
void setReason(string reason)

@param reason the HTTP reason to set

header
HttpResponse header(string header, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
header
HttpResponse header(HttpHeader header, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
headers
HttpResponse headers(T[string] value)
Undocumented in source. Be warned that the author may not have intended to support it.
headers
HttpFields headers()
Undocumented in source. Be warned that the author may not have intended to support it.
headers
string[] headers(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
headers
string[] headers(HttpHeader header)
Undocumented in source. Be warned that the author may not have intended to support it.
isSuccessful
bool isSuccessful()

Returns true if the code is in [200..300), which means the request was successfully received, understood, and accepted.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
code
alias code = getStatus
Undocumented in source.
message
alias message = getReason
Undocumented in source.
withHeader
alias withHeader = header
Undocumented in source.
withHeaders
alias withHeaders = headers
Undocumented in source.
setHeader
deprecated alias setHeader = header
Undocumented in source.

Meta