Module: Internet Protocols Module Package: HTTP
RWHttpReply RWNumReply
asString() getBody() getHeaders() |
getMajorVersion() getMinorVersion() getRequest() |
operator=() RWHttpReply() setBody() |
versionAsString() |
#include <rw/http/RWHttpReply.h>
RWHttpReply retrieves HTTP protocol reply messages. It is a subclass of RWNumReply and includes additional methods for retrieving HTTP header information.
RWHttpReply();
Constructs a default invalid RWHttpReply object.
RWHttpReply(const RWPortal& portal, const RWHttpRequest& request);
Constructs an RWHttpReply with portal as the data source. request is a reference to the RWHttpRequest object that was sent to the server to generate the reply.
RWHttpReply(const RWHttpReply& reply);
Copy constructor.
RWHttpReply& operator=(const RWHttpReply& reply);
Sets self to the value of reply. The previous contents of self are lost.
RWCString asString() const;
Returns an RWCString representing the status line and header fields for the RWHttpReply instance. The returned string does not contain the message body of the reply. The RWCString should contain 7-bit US-ASCII data.
RWCString getBody(void) const;
Retrieves the internal body associated with this reply object.
const RWHttpHeaderList& getHeaders() const;
Returns an RWHttpHeaderList object containing all of the headers associated with this reply.
int getMajorVersion() const;
Returns the HTTP major version number.
int getMinorVersion() const;
Returns the HTTP minor version number.
RWHttpRequest getRequest(void) const;
Returns a copy of the request that generated this reply.
void setBody(const RWCString& body);
Sets the internal body object of this reply.
RWCString versionAsString() const;
Returns the HTTP version number as an RWCString. The RWCString should contain 7-bit US-ASCII data.
ostream& operator<<(ostream& strm, const RWHttpReply& r);
Outputs an RWHttpReply object to an ostream using the asString member function.
NOTE -- This class does not have an extraction (>>) operator.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.