ResponseFactory.hpp

This File On Github
Ask A Question

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

ResponseFactory

Helper class to create http outgoing responses (oatpp::web::protocol::http::outgoing::Response).

namespace oatpp { namespace web { namespace protocol { namespace http { namespace outgoing { 
  class ResponseFactory {}
}}}}}

Methods

Return Type Name Summary
std::shared_ptr<Response> createShared Multiple implementations:
  1. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::BufferBody.
  2. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::ChunkedBufferBody.
  3. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::DtoBody.

ResponseFactory::createShared

  1. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::BufferBody.
    static std::shared_ptr<Response> createShared(const Status& status, const oatpp::String& text)
    
  2. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::ChunkedBufferBody.
    static std::shared_ptr<Response> createShared(const Status& status, const std::shared_ptr<oatpp::data::stream::ChunkedBuffer>& chunkedBuffer)
    
  3. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::DtoBody.
    static std::shared_ptr<Response> createShared(const Status& status,
                                                  const oatpp::data::mapping::type::AbstractObjectWrapper& dto,
                                                  oatpp::data::mapping::ObjectMapper* objectMapper)