Module: Internet Protocols Module Package: HTTP
Does not inherit
#include <rw/http/RWHttpRequestBody.h>
RWHttpRequestBody is an abstract base class from which the methods for handling message bodies are derived.
RWHttpRequestBody();
Constructs a default RWHttpRequestBody object.
virtual ~RWHttpRequestBody();
Virtual destructor.
virtual RWHttpRequestBody* clone() const = 0;
A virtual function that creates a polymorphic copy of the object on the heap.
virtual int getContentLength() const = 0;
Returns the total length of the body object, if known. Returns -1 if the Content-Length cannot be determined in the derived class.
NOTE -- An exception is thrown if data without a Content-Length is sent to a server with version less than HTTP/1.1.
virtual RWCString getNextChunk(size_t size) = 0;
Reads and returns the next size bytes from the body as an RWCString. If size bytes are not available, the remainder of the string is returned. Returns an empty string when no data is available.
virtual bool isValid() const = 0;
Returns true if the body is valid, and returns false otherwise. isValid() is virtual, which means that derived classes can define their own isValid state.
© 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.