SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Encapsulates HTTP headers and a protocol reply. More...
#include <rw/http/RWHttpReply.h>
Public Member Functions | |
RWHttpReply (void) | |
RWHttpReply (const RWPortal &portal, const RWHttpRequest &request) | |
RWHttpReply (const RWHttpReply &reply) | |
RWHttpReply & | operator= (const RWHttpReply &reply) |
RWCString | versionAsString (void) const |
RWCString | asString () const |
RWHttpHeaderList | getHeaders () const |
RWHttpRequest | getRequest (void) const |
int | getMajorVersion (void) const |
int | getMinorVersion (void) const |
RWCString | getBody (void) const |
void | setBody (const RWCString &body) |
Private Member Functions | |
virtual void | readFromPortal (const RWPortal &portal) |
Friends | |
std::ostream & | operator<< (std::ostream &str, const RWHttpReply &r) |
RWHttpReply encapsulates HTTP headers and a protocol reply. It is a subclass of RWNumReply and includes additional methods for retrieving HTTP header information.
RWHttpReply::RWHttpReply | ( | void | ) | [inline] |
Constructs a default invalid RWHttpReply object.
RWHttpReply::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::RWHttpReply | ( | const RWHttpReply & | reply | ) | [inline] |
Copy constructor.
RWCString RWHttpReply::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 RWHttpReply::getBody | ( | void | ) | const [inline] |
Retrieves the internal body associated with this reply object.
RWHttpHeaderList RWHttpReply::getHeaders | ( | ) | const [inline] |
Returns an RWHttpHeaderList object containing all of the headers associated with this reply.
int RWHttpReply::getMajorVersion | ( | void | ) | const [inline] |
Returns the HTTP major version number.
int RWHttpReply::getMinorVersion | ( | void | ) | const [inline] |
Returns the HTTP minor version number.
RWHttpRequest RWHttpReply::getRequest | ( | void | ) | const [inline] |
Returns a copy of the request that generated this reply.
RWHttpReply& RWHttpReply::operator= | ( | const RWHttpReply & | reply | ) |
Sets self
to the value of reply. The previous contents of self
are lost.
virtual void RWHttpReply::readFromPortal | ( | const RWPortal & | portal | ) | [private, virtual] |
Reads data from the portal to construct RWNumReplyLine objects in self
.
Reimplemented from RWNumReply.
void RWHttpReply::setBody | ( | const RWCString & | body | ) | [inline] |
Sets the internal body object of this reply.
RWCString RWHttpReply::versionAsString | ( | void | ) | const [inline] |
std::ostream& operator<< | ( | std::ostream & | str, | |
const RWHttpReply & | r | |||
) | [friend] |
Outputs an RWHttpReply object to an std::ostream
using the asString() member function.
© 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.