Type servlet:Response

servlet:Response returns an HTTP response message to the client.
extends net:HttpResponse
Constructors:
servlet:Response()
Creates a 200 OK servlet:Response with no message content.
servlet:Response(Node status-code)
servlet:Response(Node status-code, Node content)
Creates a servlet:Response with the given response code and message content.
servlet:Response(Node status-code, Node reason-phrase, Node content)
Creates a servlet:Response with the given response code, response message and message content (may be empty).
Functions:
Functions inherited from net:HttpResponse:
code()
Get the response code
message()
Get the response message
message(Node reason-phrase)
Set the response message
read(io:Stream stream)
readPreamble(io:Stream stream)
writePreamble(io:Stream stream)

Functions inherited from net:HttpMessage:
version()
version(Node version)

Functions inherited from net:Message:
addHeader(Node name, Node value)
Add a header value by appending it to the existing value, or creating it if the header doesn't exist already
content(Node content)
Set the message content
content(String content)
Set the message content
content()
Get the message content
contentType()
Get the value of the Content-Type header
header(Node name, Node value)
Set the named header
header(Node name)
Get a message header
Returns: The value of the header as a String
headers()
Get a Map containing all headers
parse()
parse the XML body of this net:Message
Returns: the Message body as XML
read(String message)
Read a net:Message from a String.
Returns: This net:Message.
read(io:Stream stream)
Read a net:Message from a stream.
Returns: This net:Message.
string()
Get a String representation of this net:Message.
write(io:Stream stream)
Write this net:Message to a stream.
writeContent(io:Stream stream)