Class HttpServerResponse
Represents a HTTP response as sent from the server side.
Inherits from
-
HttpResponse
(base class)
Constructors
Name | Description |
---|---|
this |
Fields
Name | Type | Descrption |
---|---|---|
httpVersion [inherited] | HttpVersion | The protocol version of the response - should not be changed |
statusCode [inherited] | int | The status code of the response, 200 by default |
statusPhrase [inherited] | string | The status phrase of the response |
headers [inherited] | InetHeaderMap | The response header fields |
cookies [inherited] | Cookie[string] | All cookies that shall be set on the client for this request |
Methods
Name | Description |
---|---|
timeFinalized | |
headerWritten | Determines if the HTTP header has already been written. |
isHeadResponse | Determines if the response does not need a body. |
writeBody | Writes the entire response body at once. |
writeRawBody | Writes the whole response body at once, without doing any further encoding. |
writeJsonBody | Writes a JSON message with the specified status |
writeVoidBody | Writes the response with no body. |
bodyWriter | A stream for writing the body of the HTTP response. |
redirect | Sends a redirect request to the client. |
switchProtocol | Special method sending a SWITCHING_PROTOCOLS response to the client. |
setCookie | Sets the specified cookie value. |
startSession | Initiates a new session. |
terminateSession | Terminates the current session (if any). |
bytesWritten | |
renderCompat | Compatibility version of render () that takes a list of explicit names and types instead of variable aliases. |
contentType [inherited] | Shortcut to the "Content-Type" header |
Authors
Sönke Ludwig, Jan Krüger
Copyright
© 2012 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.