Encapsulates reading an HTTP message body. More...
#include <rw/http/RWHttpRequestBody.h>
Public Member Functions | |
RWHttpRequestBody () | |
virtual | ~RWHttpRequestBody () |
virtual RWHttpRequestBody * | clone () const =0 |
virtual int | getContentLength () const =0 |
virtual RWCString | getNextChunk (size_t size)=0 |
virtual bool | isValid () const =0 |
RWHttpRequestBody is an abstract base class from which the methods for handling message bodies are derived.
|
inline |
Constructs a default RWHttpRequestBody object.
|
virtual |
Virtual destructor.
|
pure virtual |
A virtual function that creates a polymorphic copy of the object on the heap.
Implemented in RWHttpRequestStreamBody, and RWHttpRequestStringBody.
|
pure virtual |
Returns the total length of the body object, if known. Returns -1
if the Content-Length
cannot be determined in the derived class.
Content-Length
is sent to a server with version less than HTTP/1.1. Implemented in RWHttpRequestStreamBody, and RWHttpRequestStringBody.
|
pure virtual |
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.
Implemented in RWHttpRequestStreamBody, and RWHttpRequestStringBody.
|
pure virtual |
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.
Implemented in RWHttpRequestStreamBody, and RWHttpRequestStringBody.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |