Module: Internet Protocols Module Package: HTTP
RWHttpHostHeader RWHttpHeaderBase
#include <rw/http/RWHttpHostHeader.h>
RWHttpHostHeader is a specialization class of RWHttpHeaderBase. It defines the HTTP Host header. It is a helper class that formats its contents as Host: uri, where uri is the host machine to contact.
RWHttpHostHeader();
Constructs a default RWHttpHostHeader object with the header label set to Host and its associated value set to an empty string.
RWHttpHostHeader(const RWCString& host, int port=80);
Constructs an RWHttpHostHeader object with the header label set to Host and its associated host set to host, and its associated port set to port. The RWCString should contain 7-bit US-ASCII data.
RWHttpHostHeader(const RWHttpGenericHeader& hdr);
Constructs an RWHttpHostHeader from an RWHttpGenericHeader object. If the constructor is not able to parse a complete RWHttpHostHeader from the RWHttpGenericHeader, an RWHttpHeaderParseError exception is thrown.
RWCString getHost() const;
Returns a copy of the internal host value. The RWCString should contain 7-bit US-ASCII data.
int getPort() const;
Returns a copy of the internal port value.
virtual RWCString getValue() const;
Returns host:port as an RWCString. The RWCString should contain 7-bit US-ASCII data.
void setHost(const RWCString& host);
Assigns host to the internal host value. The RWCString should contain 7-bit US-ASCII data.
void setPort(int port);
Assigns port to the internal port value.
© 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.