Module: Internet Protocols Module Package: HTTP
RWHttpContentLengthHeader RWHttpHeaderBase
#include <rw/http/RWHttpContentLengthHeader.h>
RWHttpContentLengthHeader is a specialization class of RWHttpHeaderBase. It is a helper class that formats its contents as Content-Length: header_value, where header_value is the length in bytes of an HTTP command's body information.
RWHttpContentLengthHeader();
Constructs a default RWHttpContentLengthHeader object with the label Content-Length and a value of 0.
RWHttpContentLengthHeader(int value);
Constructs an RWHttpContentLengthHeader object with the label Content-Length and a value of value.
RWHttpContentLengthHeader(const RWHttpGenericHeader& hdr);
Constructs an RWHttpContentLengthHeader object from an RWHttpGenericHeader that represents a Content-Length HTTP header. If the RWHttpGenericHeader does not represent a Content-Length HTTP header or if the value of the RWHttpGenericHeader does not conform to the formatting of a Content-Length value, an RWHttpHeaderParseError exception is thrown.
int getLength() const;
Returns the internal length of the header.
RWCString getValue() const;
Returns the internal value as an RWCString. The RWCString should contain 7-bit US-ASCII data.
void setValue(int value);
Assigns value to the internal value.
RWCString value(void) const;
Returns the internal value as an RWCString. Deprecated, use getValue() instead. The RWCString should contain 7-bit US-ASCII data.
© 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.