Module: Internet Protocols Module Package: HTTP
Does not inherit
append() asString() getLabel() |
getType() getValue() hash() |
operator!=() operator<() operator==() |
RWHttpHeaderBase() |
#include <rw/http/RWHttpHeaderBase.h>
RWHttpHeaderBase is an abstract base class for all concrete RWHttpHeader classes. These classes are helpers that ease header attachment and formatting to various HTTP requests.
RWHttpHeaderBase();
Constructs a default RWHttpHeaderBase as part of a specific HTTP header object. The label of the header is set to an empty string, and the header type is set to RW_HTTP_ENTITY_HEADER.
RWHttpHeaderBase(const RWCString& label, RWHttpHeaderType type=RW_HTTP_ENTITY_HEADER);
Constructs an RWHttpHeaderBase as part of a specific HTTP header object. The label of the header is set to label, and the header type is set to type. The RWCString should contain 7-bit US-ASCII data.
bool operator==(const RWHttpHeaderBase& h) const;
Returns true if h is equal to self.
bool operator!=(const RWHttpHeaderBase& hdr) const;
Returns true if the RWHttpHeaderBases are not equivalent.
bool operator<(const RWHttpHeaderBase& hdr) const;
Returns true if hdr is less than self. Otherwise returns false.
virtual bool append(const RWCString& str);
Attempts to append str to the header as a new set of values, if the header supports appending of headers. Append returns true if it is successful in appending the headers. Otherwise it returns false. This function also returns false if it is not overridden in a derived class. The RWCString should contain 7-bit US-ASCII data.
virtual RWCString asString() const;
Concatenates the label and the value of the header into the format label: value and returns the result as an RWCString. The RWCString should contain 7-bit US-ASCII data.
RWCString getLabel() const;
Returns the internal label of the header. The RWCString should contain 7-bit US-ASCII data.
RWHttpHeaderType getType() const;
Returns the internal type of the header.
virtual RWCString getValue() const = 0;
Returns the value associated with the label of the header. This is a virtual function, so it must be overridden by a derived class. The RWCString should contain 7-bit US-ASCII data.
static unsigned hash(const RWHttpHeaderBase& h);
Returns the hash value of h.
© 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.