Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: rhttpmessage.h
Link against: http.lib

Class RHTTPMessage

class RHTTPMessage;

Description

An abstract HTTP message. In RFC2616, an HTTP message is defined as having a header and an optional body. This class is specialised for HTTP requests and responses.

Members

Defined in RHTTPMessage:
Body(), GetHeaderCollection(), HasBody(), RHTTPMessage(), RemoveBody(), SetBody(), iImplementation


Construction and destruction


RHTTPMessage()

inline RHTTPMessage();

Description

Default (uninitialised) constructor.

[Top]


Member functions


GetHeaderCollection()

IMPORT_C RHTTPHeaders GetHeaderCollection();

Description

Returns the header collection for the message

Return value

RHTTPHeaders


SetBody()

IMPORT_C void SetBody(MHTTPDataSupplier &aBody);

Description

Sets the messages body, replacing any existing body. The body is supplied as a MHTTPDataSupplier, which will then return the data in 1 or more chunks on request.

Parameters

MHTTPDataSupplier &aBody

The data supplier that will supply the body.


RemoveBody()

IMPORT_C void RemoveBody();

Description

Removes the body


HasBody()

IMPORT_C TBool HasBody() const;

Description

Determine whether this message has any associated body data.

Return value

TBool

ETrue if there is some body data, EFalse if not.


Body()

IMPORT_C MHTTPDataSupplier *Body() const;

Description

Gets the body. The body is supplied as a MHTTPDataSupplier, which can be used to return the current data chunk, and to acknowledge when that chunk has been consumed by the client.

Note that the client can assume the body object will remain unchanged from when it receives the first data until the end of the transaction.

Return value

MHTTPDataSupplier *

A data supplier that provides access to a body data chunk. NULL if the body has not been set, or has been removed

[Top]


Member data


iImplementation

protected: CMessage * iImplementation;

Description