Unite API

Class WebServerResponse

Object
   |
   +--WebServerResponse

class WebServerResponse


Response from the Web server.

The WebServerResponse allows the user to write data back to the client which made a request. It supports writing string data, bytes of binary data and images.


Defined in unite.js


Field Summary
 boolean chunked
          Whether or not to use chunked encoding in the response.
 boolean closed
          Whether or not this response has been closed.
 WebServerConnection connection
          Connection this response will be sent to.
 boolean implicitFlush
          Whether or not to flush data written to the response automatically.
 
Constructor Summary
WebServerResponse()
            This class has no public constructor.
 
Method Summary
 void close( <Function> callback )
           Close the connection.
 void closeAndRedispatch()
           Close the connection and redispatch the request to the Web server.
 void flush( <Function> callback )
           Flush the data in the response.
 void setProtocolString( <String> protocolString )
           Set the protocol version string of the response.
 void setResponseHeader( <String> name, <String> value )
           Set a HTTP response header.
 void setStatusCode( <String> statusCode, <String> text )
           Set the HTTP status code of the response.
 void write( <String> data )
           Write data to the response.
 void writeBytes( <ByteArray> data )
           Write binary data to the response.
 void writeFile( <File> file )
           Write a File to the response.
 void writeImage( <HTMLImageElement> image )
           Write an image to the response.
 void writeLine( data )
           Write data to the response and append a newline.

Field Detail

chunked

boolean chunked

closed

boolean closed

connection

WebServerConnection connection

implicitFlush

boolean implicitFlush

Constructor Detail

WebServerResponse

WebServerResponse()

Method Detail

close

void close( <Function> callback )

closeAndRedispatch

void closeAndRedispatch()

flush

void flush( <Function> callback )

setProtocolString

void setProtocolString( <String> protocolString )

setResponseHeader

void setResponseHeader( <String> name, <String> value )

setStatusCode

void setStatusCode( <String> statusCode, <String> text )

write

void write( <String> data )

writeBytes

void writeBytes( <ByteArray> data )

writeFile

void writeFile( <File> file )

writeImage

void writeImage( <HTMLImageElement> image )

writeLine

void writeLine( data )

Unite API

Documentation generated by JSDoc on Tue Oct 6 11:15:52 2009