Derived from: HTTPMessage
Declared in: HTTPResponse
Library: libHTTP.so
This HTTPMessage derived object implements HTTP response-message specific aspects.
HTTPResponse( void )
Calls HTTPMessage() and setup any response-message specific attributes.
virtual ~HTTPResponse( void )
Deletes the object along with any internally allocated objects like message-headers.
void SetStatusLine( const char *status ) void SetStatusLine( int32 statusCode )
Set the status-line of the response. The first form accepts a full status-line of the format: http-version SP response-code SP reason-phrase. The second form uses the provided statusCode to create the status line for you.
The first version will interpret the line to set the status-code attribute.
const char *GetStatusLine( void )
Returns HTTPMessage::GetStartLine().
void SetHTMLMessage( int32 statusCode, const char *msg = NULL )
Setup a new message with a status-code of statusCode and create an optional temporary message body with a html message. This is usefull for quickly creating an error message with "text/html" content.
The html message is created for you automatically if you don't supply msg and the statusCode is >= 400. You may provide a message yourself by providing a msg string.
int32 GetStatusCode( void )
Get the numerical status code of the message.
virtual int32 ReceiveMessage( BDataIO *io )
Implements the pure-virtual HTTPMessage::ReceiveMessage() method. See HTTPMessage::ReceiveMessage() for more information.
virtual int32 SendMessage( BDataIO *io, bool simple = false )
Overrides the default behaviour of HTTPMessage::SendMessage(). See See HTTPMessage::SendMessage() for more information.