# Body.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/protocol/http/outgoing/Body.hpp"

# Body

Abstract http outgoing body. You may extend this class in order to implement custom body transferring functionality.

namespace oatpp { namespace web { namespace protocol { namespace http { namespace outgoing { 
  class Body : public data::stream::ReadCallback {}
}}}}}

# Methods

Return Type Name Summary
[none] ~Body Virtual destructor.
void declareHeaders Declare headers describing body.
p_char8 getKnownData Pointer to the body known data.
v_int64 getKnownSize Should return the known size of the body (if known).

# Body::~Body

Virtual destructor.

virtual ~Body() = default

# Body::declareHeaders

Declare headers describing body. Note: Do NOT declare the Content-Length header.

virtual void declareHeaders(Headers& headers) = 0

# Body::getKnownData

Pointer to the body known data.

  • @return - p_char8.

virtual p_char8 getKnownData() = 0

# Body::getKnownSize

Should return the known size of the body (if known). If body size is unknown then should return -1.

virtual v_int64 getKnownSize() = 0