Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: http\rhttpmessage.h
Link against: http.lib

Class RHTTPMessage

class RHTTPMessage

Support

Supported from 7.0

Description

A message: this is the base class for requests and responses.

Message is the HTTP terminology for data exchanged between client and server, specifically being either a request or response.

A message is made up of a body and a collection of headers. The body is supplied by a MHTTPDataSupplier object, which will then return the data in one or more chunks on request.

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

See also:


Construction and destruction


RHTTPMessage()

inline RHTTPMessage();

Description

Default constructor.

[Top]


Member Functions


GetHeaderCollection()

RHTTPHeaders GetHeaderCollection();

Description

Gets the header collection for the message.

Return value

RHTTPHeaders

Headers collection


SetBody()

void SetBody(MHTTPDataSupplier& aBody);

Description

Sets the message's body, replacing any existing body.

Parameters

MHTTPDataSupplier& aBody

The data supplier that will supply the body.


RemoveBody()

void RemoveBody();

Description

Removes the body.


HasBody()

TBool HasBody() const;

Description

Tests if this message has any associated body data.

Return value

TBool

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


Body()

MHTTPDataSupplier* Body() const;

Description

Gets the body.

The body is supplied as an 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. Ownership of the body data is not transferred.

[Top]


Internal members

Description

This is internal and not intended for use.


iImplementation

protected: CMessage* iImplementation;

Description

This is internal and not intended for use.